How did the young earth separate into layers?
The layering of the earth is largely a component of its early cooling. There was a time when it was a single ball of molten rock. First it cooled enough to "crust" over. Then for about 1800 miles there exists the earth's mantel, below that magma and at its core, liquid iron and nickel. There is also probably enough gold at the center of the earth to make it a "not rare" element. The center of the earth is where all the heavy elements sank and still exist.