A fossil fuel is a hydrocarbon-containing material such as coal, oil, and natural gas, formed naturally in the Earth's crust from the remains of dead plants and animals that is extracted and burned as a fuel. Fossil fuels may be burned to provide heat for use directly, to power engines, or to generate electricity. Some fossil fuels are refined into derivatives such as kerosene, gasoline and propane before burning. The origin of fossil fuels is the anaerobic decomposition of buried dead organisms, containing organic molecules created by photosynthesis. The conversion from these materials to high-carbon fossil fuels typically requires a geological process of millions of years.