This animated video demonstrates the formation of hydrocarbons over millions of years in the depths of the Earth.
Oil and gas forms in sedimentary ocean basins. Dead plankton (organic plant and animal material) gets deposited together with mud, sand and other sediments. In this early stage the plankton/sediment layer is called sapropel. Through an increase in temperature the sapropel is converted into kerogen. Folding or faulting forms traps where oil and gas can accumulate in the pore space of a source rock below the trap otherwise it will escape to the earth's surface as seepage. The liquid or gas that forms is known as 'hydrocarbons’.
Formation of today’s fossil fuel - the beginning - approximately 400 million years ago
Dead plankton sinks to the ocean floor and gets deposited.
At about 50°C (corresponding to 1-2km burial) the sapropel is converted into kerogen (through anaerobic bacteria and chemical processes).
The sediment layers may be folded as a result of tectonic movements in the basin.
More sediments fall on top, increasing the pressure and temperature on the kerogen.
At 80-120°C (corresponding to 3-5 km burial) the conversion of kerogen into liquid pertorleum occurs.
Between 120-150°C natural gas forms and migrates from the kerogen into the sandstone reservoir.
In some sedimentary basins salty water may also migrate into the sandstone reservoir and underlie the oil.