The inner part of the Earth is called the core, which is about 1800 miles (2900 km) below the Earth’s surface. The core is an obtuse ball of the elements iron and nickel. Earth's core is made up of two layers, fluid outer core and a solid interior core.
Outer core – The core at outer of Earth is a fluid layer of about 2266 kilometers thick made up of nickel and iron which lies below the Earth’s mantle and above the Earth’s solid interior core. Its outside boundary lies 2890 km (1800 mi) below the Earth’s surface. Temperature of outer core varies between 4400°C in the outer area to 6100 °C in the inner core. Though it has the composition same as that of interior core but still it is in liquid form as it is not under enough pressure to be solid. As iron is contained in the outer core by which magnetic field is generated when it flows, which is the reservoir of the Earth's magnetic field. In Earth’s outer core, the average strength of magnetic field as measured is 25 Gauss, which is 50 times in strength than the magnetic field found at the surface.
Inner core – The inner core of the Earth’s crust is a primarily solid sphere with a radius of about 1216 km (760 mi). The inner core is composed of iron – nickel alloy. The temperature may be similar to that of sun, i.e. about 5000 ºC - 6000 ºC. It is 5150 – 6370 km below the Earth’s surface. The inner core is solid because of high pressure.
The core being so hot, a natural heat is radiated to the upper layers. A current of comes into being because of this which is known as convection current. Earth’s magnetism is caused by the movement of both outer and inner core. With the rotation of the Earth the outer core spins as it is liquid but the inner core doesn’t being solid in nature. This gives a dynamo effect and causes Earth’s magnetism.