Gary A Glatzmaier (Los Alamos National Laboratory) and Paul H Roberts (University of California, Los Angeles). For more detail about the simulated geomagnetic reversal see Nature (1995) 377, 203-209.
The magnetosphere can flip its orientation, so that the field lines which were pointed toward the north pole change and point toward the south pole. Then the south pole becomes the north pole, etc.
On Earth, the record of the reversal of the magnetic field is preserved in magnetic rocks which lie along the ocean floor. The magnetism preserved in these rocks points first in one direction, then in another direction, giving the ocean floor a stripped appearance (from a magnetic point of view). This means that many times in the past the north pole has become the south pole, and vice versa. Since no one knows how long this can take, no one can say whether it could happen over night or take thousands of years! This picture shows where the poles are currently found, and also shows that the poles drift over the surface of the Earth over time.
A planetary magnetic field is very complicated, generated in the core by a mixed up jumble of current, and is not as simple as a magnet.
The figure shows a magnetosphere configured with the (blue) field lines directed toward the north pole. Over a period of time, the magnetic field reverses itself such that the (blue) field lines are directed toward the south pole.
Mathematical theory suggests that the reversal of the field starts in the core of a planet when currents which generate the magnetic field cause the field to wrap around itself too many times.
source: windows to the universe