earth was initially very hot, with melted rocks and minerals. dense rocks, like iron, sank to the centre (to form the core), and less dense rocks, like magnesium and silica, stayed at the surface to form the crust and mantle. Due to immense pressure, the outer core is liquid and the inner core is solid.