Credit: The COMET Program (UCAR)
Planet Earth is surrounded by a magnetic field. Earth's magnetic field is almost the same shape as the magnetic field around a bar magnet, so it is called a "dipole field" (two poles). Swirling motions of molten iron and nickel in Earth's core generate our planet's magnetic field.
Earth's magnetic field is NOT exactly aligned with the geographic North and South Poles. The magnetic field is tilted about 10 degrees away from the geographic poles.