Petroleum forms from the interaction of various hydrocarbons, ancient marine life and certain minerals, such as sulfur, under intense pressure. It is a fossil fuel that is the byproduct from the remains of bacteria, plants and algae.
Petroleum formation is the result of diagenesis and catagenesis, which is also called cracking. Diagenesis is the process of compaction under mild pressure and temperature. When aquatic sediments undergo chemical reaction, microbial action and compaction from burial, they form a new structure known as kerogen and a black tar substance referred to as bitumen.
The remains of ancient marine life eventually transform into carbon-rich fossil fuels after being subjected to millions of years of intense pressure and heat. When these ancient marine organisms die, their remains sink and become buried under the seafloor where they mix with other minerals and sediments. This mixture forms a large gelatinous mass, which eventually becomes covered by countless layers of sea mud, silt and sand.
As sediments continue to pile up on the mass, the process of catagenesis happens. This occurs as a result of increased pressures and temperatures from the deeper burial. Petroleum formation requires specific temperatures. If conditions are too hot, the hydrocarbons formed from catagenesis will favor natural gas, whereas if it is too cold, the mass will remain trapped as kerogen.