Fossil fuels were formed from:
Living organisms buried inside the earth for millions of years
Fossil fuels such as coal and petroleum were formed from the dead remains of living organisms which were buried under the earth's crust for millions of years.