Core–mantle differentiation
Core–mantle differentiation is the set of processes that took place during the accretion stage of Earth's evolution (or more generally, of rocky planets) that results in the separation of iron-rich materials that eventually would conform a metal core, surrounded by a rocky mantle. According to the Safronov's model, protoplanets formed as the result of collisions of smaller bodies (planetesimals), which previously condensed from solid debris present in the original nebula.
Source: Wikipedia — Core–mantle differentiation (CC BY-SA 4.0)