According to the biogenic theory, petroleum is formed from the preserved remains of prehistoric zooplankton and algae which have been settled to the sea (or lake) bottom in large quantities under anoxic conditions. Over geological time this organic matter, mixed with mud, is buried under heavy layers of sediment. The resulting high levels of heat and pressure cause the organic matter to chemically change during diagenesis, first into a waxy material known as kerogen which is found in various oil shales around the world, and then with more heat into liquid and gaseous hydrocarbons in a process known as catagenesis.
Terrestrial plants, on the other hand, tend to form coal. Many of the coal fields date to the carboniferous period.
* 1 liter of regular gasoline is the time rendered result of about 23.5 metric tonnes of ancient phytoplankton material deposited on the ocean floor .
* The total fossil fuel used in the year 1997 is the result of 422 years of all plant matter that grew on the entire surface and in all the oceans of the ancient earth.
Fossil fuels are of great importance because they can be burned (oxidized to carbon dioxide and water), producing significant amounts of energy. The use of coal as a fuel predates recorded history. Semisolid hydrocarbons from seeps were also burned in ancient times, but these materials were mostly used for waterproofing and embalming.  Commercial exploitation of petroleum, largely as a replacement for oils from animal sources (notably whale oil) for use in oil lamps began in the nineteenth century. Natural gas, once flared-off as an un-needed byproduct of petroleum production, is now considered a very valuable resource. Heavy crude oil, which is very much more viscous than conventional crude oil, and tar sands, where bitumen is found mixed with sand and clay, are becoming more important as sources of fossil fuel. Oil shale and similar materials are sedimentary rocks containing kerogen, a complex mixture of high-molecular weight organic compounds which yields synthetic crude oil when heated (pyrolyzed), have not yet been exploited commercially.
Prior to the latter half of the eighteenth century windmills or watermills provided the energy needed for industry such as milling flour, sawing wood or pumping water, and burning wood or peat provided domestic heat. The wide-scale use of fossil fuels, coal at first and petroleum later, to fire steam engines enabled the Industrial Revolution. At the same time gas lights using natural gas or coal gas were coming into wide use. The invention of the internal combustion engine and its use in automobiles and trucks greatly increased the demand for gasoline and diesel oil, both made from fossil fuels. Other forms of transportation, railways and aircraft also required fossil fuels. The other major use for fossil fuels is in generating electricity.
Fossil fuels are also the main source of raw materials for the petrochemical industry.
Limits and alternatives
Global fossil carbon emission by fuel type, 1800-2000 AD.
Global fossil carbon emission by fuel type, 1800-2000 AD.
The principle of supply and demand suggests that as hydrocarbon supplies diminish, prices will rise. Therefore higher prices will lead to increased alternative, renewable energy supplies as previously uneconomic sources become sufficiently economical to exploit. Artificial gasolines and other renewable energy sources currently require more expensive production and processing technologies than conventional petroleum reserves, but may become economically viable in the near future. See Future energy development. Different alternative sources of energy include alcohols, hydrogen, nuclear, hydroelectric, solar, wind, and geothermal.
Levels of primary energy sources are the reserves in the ground. Flows are production. The most important part of primary energy sources are the carbon based fossil energy sources. Oil, coal, and gas stood for 79.6% of primary energy production during 2002 (in million tonnes of oil equivalent ) (34.9+23.5+21.2).
Levels (reserves) (EIA oil, gas, coal estimates, EIA oil, gas estimates)
* Oil: 1,050,691 to 1,277,702 billion barrels (167 to 203 km³) 2003-2005
* Gas: 6,040,208 - 6,805,830 billion cubic feet (171,040 to 192,720 km³) 6,805.830*0.182= 1,239 BBOE 2003-2005
* Coal: 1,081,279 million short tons (1,081,279*0.907186*4.879= 4,786 BBOE) (2004)
Flows (daily production) during 2002 (7.9 is a ratio to convert tonnes of oil equivalent to barrels of oil equivalent)
* Oil: (10,230*0.349)*7.9/365= 77 MBD
* Gas: (10,230*0.212)*7.9/365= 47 MBOED
* Coal: (10,230*0.235)*7.9/365= 52 MBOED
Years of production left in the ground with the most optimistic reserve estimates (Oil & Gas Journal, World Oil)
* Oil: 1,277,702/77/365= 45 years
* Gas: 1,239,000/47/365= 72 years
* Coal: 4,786,000/52/365= 252 years
Note that this calculation assumes that the product could be produced at a constant level for that number of years and that all of the reserves could be recovered. In reality, consumption of all three resources has been increasing. While this suggests that the resource will be used up more quickly, in reality, the production curve is much more akin to a bell curve. At some point in time, the production of each resource within an area, country, or globally will reach a maximum value, after which, the production will decline until it reaches a point where is no longer economically feasible or physically possible to produce. See Hubbert peak theory for detail on this decline curve with regard to petroleum.
The above discussion emphasizes worldwide energy balance. It is also valuable to understand the ratio of reserves to annual consumption (R/C) by region or country. For example, energy policy of the United Kingdom recognizes that Europe's R/C value is 3.0, very low by world standards, and exposes that region to energy vulnerability. Specific alternatives to fossil fuels are a subject of intense debate worldwide.
In the United States, more than 90% of greenhouse gas emissions come from the combustion of fossil fuels. Combustion of fossil fuels also produces other air pollutants, such as nitrogen oxides, sulphur dioxide, volatile organic compounds and heavy metals.
According to Environment Canada:
"The electricity sector is unique among industrial sectors in its very large contribution to emissions associated with nearly all air issues. Electricity generation produces a large share of Canadian nitrogen oxides and sulphur dioxide emissions, which contribute to smog and acid rain and the formation of fine particulate matter. It is the largest uncontrolled industrial source of mercury emissions in Canada. Fossil fuel-fired electric power plants also emit carbon dioxide, which may contribute to climate change. In addition, the sector has significant impacts on water and habitat and species. In particular, hydro dams and transmission lines have significant effects on water and biodiversity."
Combustion of fossil fuels generates sulphuric, carbonic, and nitric acids, which fall to Earth as acid rain, impacting both natural areas and the built environment. Monuments and sculptures made from marble and limestone are particularly vulnerable, as the acids dissolve calcium carbonate.
Fossil fuels also contain radioactive materials, mainly uranium and thorium, that are released into the atmosphere. In 2000, about 12,000 metric tons of thorium and 5,000 metric tons of uranium were released worldwide from burning coal. It is estimated that during 1982, US coal burning released 155 times as much radioactivity into the atmosphere as the Three Mile Island incident.
Burning coal also generates large amounts of bottom ash and fly ash. These materials are used in a wide variety of applications, utilizing, for example, about 40% of the US production.
Harvesting, processing, and distributing fossil fuels can also create environmental problems. Coal mining methods, particularly mountaintop removal and strip mining, have extremely negative environmental impacts, and offshore oil drilling poses a hazard to aquatic organisms. Oil refineries also have negative environmental impacts, including air and water pollution. Transportation of coal requires the use of diesel-powered locomotives, while crude oil is typically transported by tanker ships, each of which requires the combustion of additional fossil fuels.
Environmental regulation uses a variety of approaches to limit these emissions, such as command-and-control (which mandates the amount of pollution or the technology used), economic incentives, or voluntary programs.
An example of such regulation in the USA is the "EPA is implementing policies to reduce airborne mercury emissions. Under regulations issued in 2005, coal-fired power plants will need to reduce their emissions by 70 percent by 2018.".
In economic terms, pollution from fossil fuels is regarded as a negative externality. Taxation is considered one way to make societal costs explicit, in order to 'internalize' the cost of pollution. This aims to make fossil fuels more expensive, thereby reducing their use and the amount of pollution associated with them, along with raising the funds necessary to counteract these factors. Although European nations impose some pollution taxes, they also give billions of subsidies to the fossil fuel industry, offsetting the taxes.