1) Gravity caused the proto-Earth to become spherical as it accreted material through collisions with planetesimals.
2) Heat generated during accretion and from radioactive decay in the interior caused the Earth to separate into a core and mantle.
3) The Earth further differentiated over time into layers of different densities, with a solid iron-nickel inner core and liquid outer core, surrounded by the silicate mantle and crust on top.