The Earth's magnetic field, on the other hand, is created in the outer core of the planet. This is a fluid part of the core, made mostly of iron and nickel, and is about 2,000 kilometers thick.
NEWS: Earth's Magnetic Field Made Quick Flip-Flop
Temperature-driven convection currents in that metal fluid, as well as the Earth's spin, causes the fluid to spin and create electric currents. That creates magnetic fields, which are made even more powerful by the charged metals passing through them, creating electric currents of their own, and so on and so forth.
This vicious electromagnetic cycle is called the geodynamo. When these flows reverse, which can only happen under rare and complex conditions, the Earth's magnetic field reverses.
Now there's always someone who wants to believe that a solar magnetic reversal will cause the end of the world. The matter has been settled regarding the imminent magnetic field switch by the sun: it will not wipe out Earth, civilization, or even afternoon tea. But what about the switch in the Earth's polarity?