A compass works by using a magnetized needle or other light-weight magnet on a free rotating pivot that allows the needle to react to the magnetic field of the earth. Because opposites attract, the southern pole of the needle points toward the magnetic north pole of the earth and helps navigators determine the general direction of north.
The earth has an iron core that is part liquid and part solid. It is believed the movement of the outer core, which is liquid, creates the planet's magnetic field. The earth's magnetic field has two poles: the north and south. Although the magnetic poles are not in the same place as the earth's geographic poles, they are close enough to allow navigators to use these poles with minor adjustments to assist with their navigation.
Early explorers had to use stars and landmarks to navigate, making it very difficult to travel to destinations that were far away or unknown. The Chinese first used a compass during the Song dynasty. They allowed a magnetized piece of metal to float in a bowl of water, which served as the pivot needed for the compass to work. Compasses were not commonly used in the West until the 14th century and helped the nations of Europe to explore further and reach North and South America.