The Earth's core is concentrically zoned, with a solid inner core, and a molten ('liquid') outer core (image source: NASA).
The core also has a different composition than the mantle: the mantle is made up of silicate minerals, but the Earth's core is predominantly Fe (Iron) and Ni (Nickel), with a lighter element (either S or O - this is still a point of debate), and some sprinkles of Rb, K, and U. The Earth's core is also VERY hot (~10,800 degrees F), but it's cooling down. As the core of the Earth cools, it solidifies (hence, the solid inner core).
Because there's more than just Fe & Ni in the core, as it cools and the inner core grows, temperature (and therefore density) changes are caused in the outer core, which result in convection currents (think about how heat moves through water when you're boiling a pot of water to make pasta). In fact, the same convective processes occur in the Earth's mantle, as heat gets transferred from the outer core to the lower mantle.
BUT, because the outer core is a metal - a great electrical conductor - when it moves in convective currents it generates the magnetic field. AND, once you generate a magnetic field and keep moving around a good conductor (like liquid metal) within that magnetic field, it will persist until there is no more current movement within the magnetic field (it's basically a positive feedback loop).
Here's a great picture from the USGS that illustrates this phenomenon:
Earths magnetic field.
Click Here to return to the search form.