Here's how it happens:
* Organic matter accumulates: Over millions of years, layers of dead plants and animals accumulate in swamps, lakes, and oceans.
* Pressure and heat: As more layers build up, the weight of the overlying material creates immense pressure and heat.
* Transformation: This pressure and heat transform the organic matter into fossil fuels, which are:
* Coal: Formed from ancient forests and swamps.
* Oil (petroleum): Formed from marine organisms (algae, plankton).
* Natural gas: Also formed from marine organisms.
Fossil fuels are a significant source of energy for humans, but their extraction and use have a considerable impact on the environment.