Our planet's magnetic field is believed to be generated deep down in the Earth's core. ... The Coriolis force, resulting from the Earth's spin, also causes swirling whirlpools. This flow of liquid iron generates electric currents, which in turn produce magnetic fields.