Teleport to coordinates
Move to any place on the map by entering its X, Y and Z coordinates.
Commands
/tp @s 0 64 0 Teleports you to the coordinates 0, 64, 0
/tp @s ~ ~100 ~ Teleports you 100 blocks up (relative coordinates)
/tp @s 0 -60 0 Teleports you to bedrock level (warning: dangerous!)
/tp @s ~10 ~ ~10 Teleports you 10 blocks east and 10 blocks south
How it works
The /teleport command, or /tp for short, is one of the most commonly used commands in Minecraft. It moves a player to exact X, Y and Z coordinates in the world. You can check your coordinates by pressing F3 (Java) or by turning on the Show Coordinates option in the settings (Bedrock). The X axis runs east-west, Z runs north-south and Y is the height. The world spawn is usually somewhere around 0, 64, 0. The command accepts both absolute values (for example 100 64 -200) and relative values with a tilde (for example ~10 ~ ~-5, which moves you 10 blocks along the X axis and 5 blocks back along the Z axis). The caret (^) works in the player's local coordinate system: ^0 ^0 ^10 teleports you 10 blocks straight ahead, whichever way you're facing. You can also rotate the player by adding yaw and pitch values after the coordinates.
Practical tips
F3 (Java) shows your current coordinates: write them down before you teleport so you can get back.
The tilde (~) means a relative value: ~5 is 5 blocks from your current position.
The caret (^) uses local coordinates: ^0 ^0 ^10 is 10 blocks straight ahead of you.
Be careful with the Y value: teleporting into a block can suffocate you.