Why does the earth have a magnetic field?
The Earth's molten core rotates at a high speed, which generates the planet magnetic field.