Earth was probably formed by planetesimal accretion processes, along with primordial materials available at the origin of the proto-solar system at 4,567 Ga. Among these materials were present many primordial gases such as hydrogen, helium, nitrogen, methane, among others, including complex molecules such as hydrocarbons and polycyclic aromatic hydrocarbons compounds (PAHs) and water.
The predominant silicate materials formed from dust and impacts were submitted only to partial melting and primary geochemical differentiation focused heavier metallic elements like iron and nickel in the core of the planet with a fraction of metal carbides. Many primordial gases, carbon and hydrocarbons also were trapped inside the planet until the formation of the crust. Impacts, which are the most dominant geological process in the universe, becomes more rare after the end of the accretionary processes.
Many geologists still think that the planet's interior is filled with magma, which is nonsense, because the formation of magma is due to strong decompression that induce formation of pockets or locally magma chambers and that can promote volcanism on the surface. Thus the Earth in its juvenile stage, was not an incandescent body as seen in pictures present in several books of geology, geography and others geosciences. These pictures leads to a misunderstanding about planet formation and, consequently, at this point of view, that hydrocarbon molecules would not be stable in a completely melted body.
Thermodynamic studies show that hydrocarbons are stable at high pressures and temperatures in the Earth's interior. Most of the carbon remained in the inner part and another part of this carbon reach the surface through the processes of outgassing caused by tectonic forces.
Understanding the process of planetary formation is fundamental to geology, both in the interpretation of the internal and external Earth's dynamics systems.