When you die you get to pick your respawn point from a list of the last 10 beds you've slept int and the world spawn (configurable).
Commands
to manually add a spawn point use
/addSpawnPoint <name> [player] [x y z] [dimension]
to clear your spawn points use this command:
/clearSpawnPoints [player]