The Magnetic field of the Earth was at one time thought to be generated by permanent magnetization of the inner core. While it is possible that the core is above the Curie point at the pressures involved, this theory cannot explain the periodic reversals that the magnetic field has experienced. (Merrill 285-286) The currently accepted explanation is dynamo theory.
Dynamo theory involves the self-regeneration of magnetic fields within a conductive liquid (such as the Earth's outer core). The theory was first proposed by Joseph Larmor in 1919 as an explanation of magnetic phenomena in the sun but has later been used as a theory of the Earth's magnetic field. (Wikipedia)
The basic premise of a dynamo is best explained by example. The Bullard disc dynamo consists of a rotating metal disc on an axis and a stationary coiled wire that is attached via brushes to the disc and axis. (Backus 213) This example obviously bears little resemblance to the fluid motion of the Earth's core, but the basic premise is the same.
Suppose that the disc is being driven to rotate by an external torque. Assuming the presence of an initial magnetic field, an electric current in the disc will be generated in the radial direction due to the Lorentz force. The electric current will drive the coil which in turn generates a magnetic field. As long as the disc continues to rotate the dynamo will continue to generate its own self-reinforcing magnetic field. As the field grows so does the magnetic frictional force on the disc. At some point the external driving force will not be powerful enough to keep the disc spinning and the field will rapidly collapse. When the field collapses the disc will be able to spin again and the process repeats in a periodic fashion. (Backus 217)
The double-disc dynamo is much more complicated. If the discs are again driven by a constant external torque the magnetic fields produced will now be chaotic. The field oscillates about an equilibrium point but also periodically undergoes reversal in polarity. (Demorest 15) Again it must be emphasized that the basic principles are the same as the Earth's dynamo but the actual mechanisms are quite different.