What does a compass do in space?
My compass points to North wherever I am on Earth, so what will happen when I go into space?
This basically depends where you are in space.
You may have played with a magnet when you were a kid with some iron filings on a piece of paper.
You'll have seen something that looks very much like the Earth's magnetic field produced by a magnet. From a magnet it comes out of the North Pole and curves round in two big ovals and comes back upwards at the South Pole.
We on Earth can't see that field and so when we're on the ground it's going from the South Pole to the North Pole and so the compass points north. If you were right at the North Pole it would actually point straight downwards and if you were at the south pole it would point straight upwards.
Now if you were out in space you would have the same thing. So if you were above the equator it would essentially be pointing to the north. And if you were above the Poles it would be pointing straight up or down.
The farther away you go, the weaker it will get so that eventually the sun's magnetic field will overwhelm it.
So if you were to fly around the world in a geosychronous way so that you were parallel to the equator and going round at the same rate as the Earth, it should still point north-south. But if you were to do an orbit Pole-Pole, like some of the weather satellites do, would it get confused as it went over the North Pole pointing straight down at the North Pole and rotating over and over its head as you go round.
Spaceships mostly they get their direction by looking at the stars. The North Star is always in the same direction so you look at where it is and you know which direction you're pointing in...