The correct answer is:
B. It has Nickel (Ni) and Iron (Fe) in the core.
Earth has a magnetic field due to the motion of molten iron and nickel in its outer core, which generates electric currents. These electric currents create the Earth's magnetic field through a process known as the geodynamo.