While iron and nickel form the liquid outer layer of Earth's core, the solid inner core is made mostly of iron. The iron in Earth's core is what gives the planet its magnetic field.
According to National Geographic, the inner core of the earth is approximately 750 miles thick. Even though the iron is extremely hot, between 9,000 and 13,000 degrees Fahrenheit, it remains solid because of the pressure from the outer layers of the Earth. The outer core, which surrounds the inner core, is about 1,430 miles thick. It is also extremely hot, ranging from 7,200 to 9,000 degrees Fahrenheit.