Final answer:
Earth's layers developed due to the process of differentiation, which sorts planetary components by density. Gravity and heat caused heavier elements to sink, forming the core, and lighter elements to form the crust. This layering solidified as the Earth cooled.
Step-by-step explanation:
The Earth developed layers as it cooled due to a process known as differentiation, which is dependent on the differences in density of the planet's major components. During the early stages of Earth's formation, the interior was hot enough to melt, allowing materials to rearrange by density. Heavier metals like iron sank to form the planet's core, while lighter materials rose to form the crust. This process was aided by gravity and was possible because the melting point of rocks was exceeded, typically more than 1300 K. As the Earth cooled, these layers became permanent, leading to the distinct layered structure of the core, mantle, and crust we observe today.
It's important to note that Earth's magnetic field, escape of gases, or speed of rotation did not cause this layering process. Instead, it is primarily the action of gravity on materials of varying densities within a molten or partially molten Earth that resulted in differentiation. The phenomenon can also be seen in other celestial bodies, like the Moon and some large moons in the outer solar system that have differentiated into layers of rock, metal, and in some cases, ice.