What Causes Earth Magnetic Field?

The core of the Earth is made up of liquid iron and this is what creates the Earth’s magnetic field. Without the magnetic field, life on Earth would not be possible. Surprisingly, the magnetic field in the Earth seems to reverse from time to time without any known cause.