The Earth has a magnetic field around it, and some magnetic minerals line up with that field. A compass also lines up in the field so that one end points north.
The polarity of the Earth’s magnetic field has ‘flipped’ many times in the past – the compass needle that at the moment points north would have pointed in the opposite direction at other times. These changes in polarity are called magnetic reversals, and the study of them is called paleomagnetism.
You may have seen what happens when someone holds a magnet close to iron filings. The filings form a pattern around the magnet as they line up in the magnetic field. Something similar happens to magnetic minerals, such as magnetite, in rocks.
There are places in the Earth’s crust where molten magma pushes up and spreads slowly across the ocean floor. As the magma cools, magnetite particles in it line up with the Earth’s magnetic field and become fixed in position in the resulting rock. These magnetite particles are like tiny fossil compasses. By measuring how these particles are lined up, geologists can work out if the magnetic field was ‘normal’ (the same direction that it is now) or ‘reversed’ when the rock was formed.
Geomagnetic polarity timescale
A pattern of reversals going back 170 million years, looking like a barcode, has been recorded in the spreading oceanic crust. Many of the reversals have been precisely dated using radiometric methods. The dated barcode of changing magnetism is called the geomagnetic polarity timescale.
Evidence for magnetic reversals is also preserved in some sedimentary rock sequences found on land. For example, a pattern of magnetic reversals has been recorded through a thick sequence of rocks near Whanganui. This pattern matched a segment of the geomagnetic polarity timescale, so geologists could use the date from this to date the Whanganui rocks.
Useful link
Read more on Earth's magnetic field on geologist Brian Ricketts' blog Geological Digressions.