Fossil fuels are created over several hundred million years through a process that converts deceased organic life into hydrocarbons. This process that requires a careful balance of heat and pressure uses two different life types to generate three different results. These results are the fossil fuels known as coal, oil, and natural gas.
Coal starts as a prehistoric collection of plant life that dies and collects in still, lifeless waters and does not decay. Over time, these plant filled bogs become saturated with water and are compacted into a substance called peat. These peat bogs are eventually covered with sediments and trapped under ground.
As trapped peat becomes more and more compressed under many layers, the water is slowly squeezed out, leaving the plant material behind. Pressure continues to compact the peat until it becomes a layer known as Lignite. From there the Lignite is further compressed from the layers of sediment above and below it until it becomes Bituminous coal, and eventually Anthracite coal. Anthracite coal is the version that burns the best, and at a hotter temperature. All forms of coal usually reside in layers between sedimentary rock and the veins can run for great distances. Not all known coal deposits are capable of being extracted though, as some remain on fire to this day, burning beneath the earth.
Apart from land plants that form coal, oil and natural gas starts from marine plankton and other small plants and animals that accumulates in non-decaying quantities on the ocean floor. This quantity of dead material continues to build on the ocean floor, often slowly being covered with layers of sediment before receiving the next layer. Eventually the bottom is covered entirely and the layer of rock with the former life is confined to an area with abundant heat and pressure.
While in this pressure cooker, the reformed hydrocarbons slowly leak out of the mixture and travel through the porous upper layers until it is trapped by a layer of rock it cannot bypass. This process will continue and the collection of oil and natural gas will grow larger. Eventually, the rock that supplied the oil and natural gas will run out or get too hot. When it becomes too hot the hydrocarbons are destroyed. Of course, the substances that were bled off are known as fossil fuels. In time they will be harvested through oil wells and converted into fuels for cars or even into plastics.