@Mew for the second part: he Earth's core was formed very early in Earth's history as heavier molten iron sank toward the center of the planet. As the Earth cooled and dissipated its internal heat toward the surface, some molten iron began to solidify to create the dense, solid inner core at the center of the planet. Enormous pressure keeps the inner core solid in a region of temperatures in the range of 7,000 degrees Fahrenheit and possibly much higher.
Fluid iron in the outer core has continued to solidify at the boundary between the two cores, so that over a billion years, the inner co…