Fossil fuels are fuels formed from ancient organic materials such as plants and animals. The three main types of fossil fuels are coal, oil, and natural gas. Coal forms from decayed vegetation over millions of years of heat and pressure. Oil forms from decayed plants and organisms trapped underground. Natural gas forms from the remains of organisms subjected to heat and pressure deep underground. These fossil fuels are important energy sources but their extraction and accidents involving their transport have caused environmental damage.