There are three types of fossil fuels: coal, gas and oil. All of these are burned to produce heat.
They are so-called because all three are the fossilised remains of plants and sea creatures. When these died, their remains sank to the bottom of oceans. Eventually sedimentary rock formed and the material was altered by heat and pressure inside the earth over millions of years.
The result was coal, gas and oil. The original source of this energy was the Sun, without which the plants and animals could not have lived.
Choose from the links above.