A compass would not work without a magnet. Inside the compass is a magnet which moves to line up with the Earth's natural magnetism. The north pole of the magnet is attracted to the south pole of the Earth. As such, the magnet moves to always be lining up in this way. When you use a magnet, you can see this in action as the needle moves around to always point northward and from knowing this, you can tell which way you are facing.