During the formation of protoplanets, they undergo a process called differentiation. This is when the heavier elements, such as iron, sink to the center, forming a core, while lighter materials, like silicates, form the mantle and crust. This differentiation is crucial for the development of planets with layered structures, like Earth.