The CORE of the Matter
Beneath the mantle is the Earth's core. The Earth's core consists of a fluid outer core and a solid inner core. Because the outer core contains iron, when it flows it generates a magnetic field. This is the source of the Earth's magnetic field.