Fossil fuels such as coal, oil, and natural gas are formed from the remains of ancient living organisms. Coal forms from decayed plant matter buried under layers of sediment. Oil forms from the remains of tiny plankton buried under pressure and heat deep underground. Natural gas forms in a similar way from buried organisms and is composed primarily of methane. These fossil fuels are important energy sources, with coal powering power plants and factories while oil and natural gas are used for transportation, manufacturing, electricity production, and more. However, accidents like the Exxon Valdez and Deepwater Horizon oil spills have caused environmental damage from fossil fuel extraction and transportation.