The exact cause of the Earth’s magnetism is not known even today. However. some important factors which may be the cause of Earth’s magnetism are:
(i) Magnetic masses in the Earth.
(ii) Electric currents in the Earth.
(iii) Electric currents in the upper regions of the atmosphere.
(iv) Radiations from the Sun
(v) Action of moon etc.
However, it is believed that the Earth’s magnetic field is due to the molten charged metallic fluid inside the Earth’s surface with a core of radius about 3500 km compared to the Earth’s radius of 6400 km.