The position of Earth's magnetic field changes over geologic time. Currently, the north magnetic pole is located near Earth's North Pole, a condition called normal polarity. Periods when the north magnetic pole is located near Earth's South Pole are called reversed polarity.
When molten lava solidifies at mid-ocean ridges, iron-containing minerals in the lava align themselves with Earth's active magnetic field. These minerals record the orientation of the magnetic field at the time they solidified.