Fossil fuels are burned to produce heat energy. Heat energy is used to make electricity, cars, trains, buses, tractors, boats move and work. It also helps us keep warm in side buildings. Thats why some people use coal for fires. Fossil fuels were made millions of years ago from ancient decaying plants and animals.
Coal is made from decayed animals millions of years ago. The energy comes from energy that was stored in giant animals that lived hundreds of millions of years ago in swamp forests, even before dinosaurs! When these giant animals and ferns died, they formed layers at the bottom of the swamps.Water and dirt began to pile up on top of the dead animals it squeezed the water out from the pressure of the dirt and created coal. This whole process took millions of years.
Oil is made from decayed plants millions years ago. The dead plants die down into the ground and go to a murky place such as a swamp and sink to the bottom of the swamp for millions of years while doing a process. The process is the dirt piles up on top of the plants for millions of years and the pressure squeezed the murky water out. The dirt and pressure keeps pushing down for about couple million years.
Natural gas was formed millions of years ago from plants and tiny sea animals were buried by sand and rock. Their were layers of mud, sand, rock, and plant, and animal matter that contused to build up for millions of years.