The Earth's magnetic field has flipped hundreds of times, north becoming south and back. The record of those reversals is frozen into the ocean floor, and reading it settled the argument over continental drift.

The field is generated by convection in the liquid iron outer core. Moving conducting fluid, in the presence of a field, generates currents that sustain the field, which is a self-exciting dynamo.
It is not a permanent magnet. Iron loses magnetism above its Curie temperature, around 770 degrees Celsius, and the core is far hotter. The field exists only because the fluid keeps moving, and the motion is driven by heat escaping from the core and by the solidification of the inner core.
A dynamo of this kind has no preferred polarity. The equations work equally well either way round, which is why reversal is possible at all.
Volcanic rock contains magnetic minerals. When lava cools through the Curie temperature, those minerals align with the ambient field and lock in that direction permanently. A lava flow is therefore a compass reading from the day it cooled.
Bernard Brunhes noticed in 1906 that some rocks were magnetised opposite to the present field. Motonori Matuyama proposed in 1929 that the field itself had reversed, dating the most recent change to the early Pleistocene. The suggestion was not widely accepted, since a self-reversing mineral seemed more plausible than a planetary field turning over.
Radiometric dating of lavas through the 1950s and 1960s settled it. Rocks of the same age had the same polarity worldwide regardless of their composition, which no chemical self-reversal could explain.
The decisive evidence came from the sea.

New oceanic crust forms at mid-ocean ridges, cools, records the field, and moves outward as more crust forms behind it. If the field reverses periodically, the sea floor should carry stripes of alternating magnetisation, symmetric on both sides of the ridge.
Frederick Vine and Drummond Matthews published that prediction in 1963, with Lawrence Morley reaching it independently and having his paper rejected. Magnetic surveys towed behind ships found exactly the predicted pattern: parallel stripes, matched across the ridge like a mirror, with widths proportional to the duration of each polarity interval.

This was the observation that made seafloor spreading undeniable, and with it plate tectonics. Continental drift had been proposed by Alfred Wegener in 1912 and rejected for half a century, largely because no mechanism was known. The magnetic stripes supplied both the mechanism and a measurement of its rate, which is a few centimetres a year and matches independent estimates.
The stripes also provide a dating tool. Because the reversal sequence is irregular, a pattern of stripe widths is effectively a barcode, and matching a sample to the sequence dates it.
Reversals are not periodic. Intervals between them range from tens of thousands of years to tens of millions. The Cretaceous Normal Superchron lasted about forty million years with no reversal at all, and nobody knows why.
The most recent full reversal, the Brunhes-Matuyama, was about 780,000 years ago. Shorter excursions, in which the field weakens and wanders without completing a flip, are more frequent, the Laschamp event around 41,000 years ago being the best studied.
A transition takes something on the order of a thousand to ten thousand years. During it the dipole weakens substantially and the field becomes complex, with multiple poles at the surface rather than a simple north and south.
The dipole has weakened by roughly ten percent since systematic measurement began in the 1830s, and the South Atlantic Anomaly, a region of unusually weak field, has grown.
Whether this signals an approaching reversal is not known. Paleomagnetic records show comparable weakenings that did not lead to one, and the present field strength remains above its long-term average. Predicting the core's behaviour is not currently possible.
The consequences are also frequently overstated. There is no established correlation between reversals and mass extinctions, despite repeated attempts to find one. The atmosphere provides most of the shielding against cosmic radiation regardless of the field. The practical concerns are increased satellite radiation exposure, disruption to navigation systems that use the field, and possible effects on power grids, which are serious engineering problems rather than a threat to life.