The stratification of Earth into its geologic layers was brought about by the formation of the Earth's iron core. The iron core was generated by a combination of radioactive decay and gravitation, which raised the temperature enough for molten iron to form. The migration of molten iron to the center of the Earth displaced the less dense materials toward the surface.
The early Earth needed lots of energy to trigger the creation of molten iron. Some of this energy came from radioactive decay. Radioactive elements such as uranium and thorium give off heat when they decay. Radioactive elements were present in greater amounts in the early Earth. The radiation emitted by these elements increased the temperature of the Earth by roughly 2,000 degrees Celsius (about 3,600 degrees Fahrenheit).
Gravitational forces both helped the iron accumulate in the center of the Earth and helped generate additional temperature. As the early Earth compacted into a planet thanks to gravity, this compaction gave off heat. As a result, gravitational energy helped raise the temperature of the Earth by an additional 1,000 degrees Celsius (about 1,800 degrees Fahrenheit). In turn, this temperature increase helped sustain the presence of molten iron at the Earth's core.
The Iron Core
Once the temperature of the Earth was hot enough to form molten iron, the iron was pulled inward by gravity. As this happened, the less dense silicate minerals moved upward. These rocks and minerals formed the crust and mantle of the Earth. Some of the radioactive elements, such as uranium and thorium, also solidified in the upper layers of the Earth. While these elements are dense, their atomic structure makes them less likely to pack in alongside the dense iron of the core.
The early Earth experienced many meteor and asteroid impacts. This constant bombardment helped raise the surface temperature and kept materials from cooling and coalescing on the surface. This overall instability of the surface materials made them susceptible to separation due to gravity. The lightest materials stayed at the top of the crust, and the denser materials gravitated lower, into the mantle. Once the Earth cooled, the crust solidified and plate tectonics began.