The Earth's magnetic field is aligned roughly along the spin axis and has an approximate dipole shape, similar to that of a bar magnet, with north and south magnetic poles. This is the normal state of affairs, but occasionally the magnetic field switches polarity, the north and south magnetic poles reverse, and the field settles down in the opposite state. The process goes by several names – "magnetic field reversal" and "polarity transition" are the most common.
Reversals have been documented as far back as 330 million years. During that time more than 400 reversals have taken place, one roughly every 700,000 years on average. However, the time between reversals is not constant, varying from less than 100,000 years, to tens of millions of years. In recent geological times reversals have been occurring on average once every 200,000 years, but the last reversal occurred 780,000 years ago. At that time the magnetic field underwent a transition from a "reversed" state to its present "normal state".

We get our information about reversals from certain types of rock in which information about the direction of the magnetic field is imprinted. When igneous rocks, which may form inside the Earth or on its surface, cool and solidify they acquire a magnetization parallel to the ambient magnetic field. If the rock cools quickly, as would a lava flow, it acquires an almost instantaneous record of the magnetic field. Slowly cooling rocks, such as those that form inside the Earth, acquire a record of the magnetic field smeared over a much longer period of time. Sedimentary rocks acquire their magnetizations as each individual grain of sediment aligns itself in the direction of the magnetic field as it is deposited.
Occasionally certain rocks can tell us more than just the polarity of the magnetic field at their time of formation. Sometimes, lava flows occur frequently enough, or sediment deposition is fast enough, that we can actually determine the change in direction and field intensity during the reversal itself. These occurrences are relatively rare, and the information sometimes ambiguous, but here is what researchers have learned.
Although other mechanisms – such as meteor impacts – have been postulated, it is generally agreed that reversals occur because of some change in the dynamo process that generates the magnetic field. The simplest explanation is that convection in the outer core ceases, allowing the magnetic field to decay. Eventually, heat build up will start convection going again and a new field will form whose polarity will depend on the polarity of any residual field at the spot where convection restarts. The problem with this theory is that reversals take only 5,000 years, but it takes 15,000 years for the field to decay. Ultimately, the occurrence of reversals must be related to changes in the fluid flow in the outer core. In fact, there is evidence, borne out by computer simulations, that fluid motions try to reverse the field every few thousand years, but that the inner core acts to prevent reversals because the field cannot diffuse as rapidly in the inner core as it can in the fluid outer core. Only on rare occasions can the thermodynamics, the fluid motion and the magnetic field all evolve in a compatible manner that allows for the original field to diffuse completely out of the inner core so that the new dipole polarity can diffuse in and establish a reversed field.
Many authors have pointed out that the dipole part of the magnetic field has been weakening during historic times, and that if the present trend continues, the dipole field will go to zero in roughly 1500 years. Some people take this to mean that we are entering a reversal. Although this possibility cannot be discounted, many investigators believe that the trend will not continue and that the field will regain its strength, as it has many times in the past.