Our planet’s magnetic field is believed to be generated deep down in the earth’s core. The coroiolis force, resulting from the earth’s spin also causes swirling whirl pools. This flow of liquid iron generates electric current, which in turn produce magnetic fields.