Fossil fuels are hydrocarbons, primarily coal, oil, and natural gas, formed from the remains of dead plants and animals. Over millions of years, different types of plants and animals have been buried at different depths and temperatures. This process has led to the creation of the three main types of fossil fuels: coal, oil, and natural gas.Coal is the most abundant fossil fuel on Earth. It is formed from the remains of plants that were buried deep underground and subjected to high temperatures and pressures. Coal is mostly carbon, with smaller amounts of hydrogen, oxygen, and other elements.Oil is formed from the remains of marine plants and animals that were buried in shallow seas. Over time, the heat and pressure of the water transformed the organic matter into oil. Oil is mostly hydrocarbons, with smaller amounts of other elements, such as oxygen and sulfur.Natural gas is formed from the remains of plants and animals that were buried in deep underground. The heat and pressure of the rock transformed the organic matter into natural gas. Natural gas is mostly methane, with smaller amounts of other hydrocarbons, such as ethane and propane.