Answer:
By the help of magnetic field of the earth
Step-by-step explanation:
Compasses, also known as magnetic compass, help us primarily in navigating and determine position on the globe. The planet Earth has its own magnetosphere or magnetic field that is close with that of a magnetic poles, and this is how compass works. The compass needle aims north and south as it happens to coincide with the Magnetosphere or magnetic field.