The earth was mostly in a volatile state during its primordial stage. Due to gradual increase in density the temperature inside has increased. As a result the material inside started getting separated depending on their densities. This allowed heavier materials (like iron) to sink towards the centre of the earth and the lighter ones to move towards the surface. With passage of time it cooled further and solidified and condensed into a smaller size. This later led to the development of the outer surface in the form of a crust. During the formation of the moon, due to the giant impact, the earth was further heated up. It is through the process of differentiation that the earth
forming material got separated into different layers. Starting from the surface to the central parts, we have layers like the crust, mantle, outer core and inner core. From the crust to the core, the density of the material increases.
The configuration of the surface of the earth is largely a product of the processes operating in the interior of the earth. Exogenic as well as endogenic processes are constantly shaping the landscape.