The earth is a huge magnet in itself with its north and south poles. The north and south of the place can easily be detected with the help of a bar magnet.
A freely suspended bar magnet always rests in the geographic N-S. direction. Since the South pole of the earth's magnet is closer to the geographic north, the north pole of the suspended magnet will always point towards the geographic north, and the south pole of the freely suspended magnet will point towards the geographic south.