The Earth's magnetic field is generated as the molten iron of the Earth's outer core revolves around its solid inner core, when surges in the molten iron occur, magnetic tempests are created!