Fossil fuels are energy-rich substances—coal, oil, and natural gas—formed from the buried remains of ancient plants and microorganisms over millions of years. That is the short answer. The longer answer is more interesting, because "fossil fuels" is really a category of three quite different materials that share one origin story and one modern consequence: burning them releases energy that plants captured from sunlight long before humans existed.
If your question is about how fossil fuels formed, are used, or are affecting the environment, the explanation below covers all three, since the distinctions matter for understanding everything from electricity prices to climate policy.
The basic idea: stored ancient sunlight
The energy in fossil fuels did not come from the Earth itself. It came from the Sun.
Photosynthetic organisms—plants on land, algae and plankton in water—convert sunlight into chemical energy stored in their tissues. When those organisms die, most of their remains decompose, and the carbon they contain returns to the atmosphere as carbon dioxide. But under certain conditions, some of the remains get buried before they can fully decay. Over geological time, heat and pressure transform that buried organic matter into the concentrated, combustible materials we call fossil fuels.
The key phrase is geological time. Fossil fuels form over tens to hundreds of millions of years. That timescale is what makes them effectively nonrenewable: humans consume them far faster than any natural process could replace them.
The three fossil fuels and how each forms
Coal, oil, and natural gas are distinct in how they formed:
Coal originates mostly from land plants that accumulated in wetlands and swamps. As layers of plant material were buried, compressed, and heated, water and volatile compounds were driven off, leaving progressively carbon-rich material—the sequence from peat to lignite to bituminous coal to anthracite. Coal formation is primarily associated with the Carboniferous period, roughly 359 to 299 million years ago, when vast swamp forests covered large parts of the planet.
Oil (petroleum) forms mainly from marine microorganisms—plankton and algae—that settle on the seafloor in oxygen-poor conditions where decay is limited. Buried under accumulating sediment, this organic matter is "cooked" at moderate temperatures (roughly 60–120°C) over millions of years, converting it into liquid hydrocarbons. The oil then migrates through porous rock until it is trapped by impermeable layers, forming a reservoir.
Natural gas is mostly methane. It forms both from marine organic matter at higher temperatures than oil—which is why gas is often found deeper or "downstream" of oil in the same geological kitchen—and from coal beds and other organic-rich rocks. Some gas is also produced by microorganisms at shallower depths.
What unites all three is the same fundamental chemistry: organic carbon, transformed by burial, heat, and pressure into concentrated fuel.
Why they are called "fossil" fuels
The word fossil originally meant anything dug up from the earth. Fossil fuels are not fossils in the sense of dinosaur bones or shells; they are the altered remains of living things. The name reflects the fact that the material is a geological relic of past life. This is a source of occasional confusion: a paleontologist studying a fossil skeleton and a geologist studying a coal seam are both examining ancient biological remains, but only one is studying what most people mean by a fossil.
How they are extracted and used
Coal is mined—either from surface mines, where entire seams are exposed and removed, or from underground mines. Oil and gas are extracted by drilling wells into reservoirs, with pressure (natural or assisted) driving the fluids to the surface. Extraction technology has expanded enormously: hydraulic fracturing and horizontal drilling opened up tight rock formations that were once uneconomic, and offshore platforms reach reservoirs beneath the seafloor.
The uses are broad. Coal has historically been the dominant fuel for electricity generation; it remains large in some countries, though many have been reducing it. Oil is refined primarily into transportation fuels—gasoline, diesel, jet fuel—and also into petrochemical feedstocks for plastics, fertilizers, and countless synthetic materials. Natural gas is used for electricity, heating, industrial processes, and as a feedstock for hydrogen and ammonia production.
This versatility explains why fossil fuels became so central to modern life. They are dense, storable, transportable, and—historically—cheap to extract. For much of the twentieth century, they powered industrialization, electrification, and the expansion of motorized transport.
Why fossil fuels matter beyond energy
The environmental consequences are the reason fossil fuels dominate current policy conversations.
When fossil fuels burn, the carbon that was locked underground for millions of years combines with oxygen to form carbon dioxide, which is released into the atmosphere. This is the core of the climate problem: the carbon cycle has been short-circuited. Fossil carbon that had been sequestered away from the atmosphere is being returned to it rapidly. The atmosphere's greenhouse gas concentration has risen substantially since the industrial era, and the scientific consensus attributes most of the observed warming to this increase.
Combustion also produces air pollutants—sulfur dioxide, nitrogen oxides, particulate matter—that harm human health and contribute to acid deposition and smog. Extraction and transport carry risks of spills, methane leakage (methane being a potent greenhouse gas in its own right), and land and water disturbance.
These are not merely abstract concerns. They are the reasons many governments now treat fossil fuel policy as climate policy, and why the phrase "energy transition" appears so often in discussions of electricity, transport, and industry.
Common points of confusion
A few distinctions are worth keeping clear.
Fossil fuels are not "made from dinosaurs." They are mostly formed from plants and microorganisms, not large animals. The dinosaur meme is memorable but misleading.
They are not being made today in any meaningful quantity. Formation requires deep burial and millions of years. By the time any modern plant matter becomes coal or oil, the energy system will look nothing like today's.
"Fossil fuel" is not synonymous with "energy." Nuclear power, solar, wind, and hydropower are all energy sources but none are fossil fuels. Some electricity generation is fossil-fueled; some is not. The distinction matters when evaluating grids or policies.
Oil and coal are not interchangeable. They differ in formation, extraction, refining or processing, and typical use. Saying "fossil fuels cause X" without specifying which fuel and which use can obscure real differences—natural gas, for instance, emits less carbon dioxide per unit of electricity than coal, though its methane leakage complicates the comparison.
The term can be used loosely. Sometimes people say "fossil fuels" when they mean the energy sector in general, or "coal" when they mean any carbon-intensive fuel. Precision helps when discussing policy.
A brief word on the climate context
The scientific understanding of fossil fuels and climate is well established. The atmospheric carbon dioxide concentration is now higher than at any point in the last several hundred thousand years, and the increase is clearly linked to human burning of fossil fuels and land-use change. Global average temperatures have risen, and the resulting changes—sea-level rise, more frequent heat extremes, shifting precipitation patterns—are documented and projected to worsen with continued emissions. The International Energy Agency and other major bodies have repeatedly emphasized that limiting warming requires shifting investment and infrastructure away from unabated fossil fuels. These are stable, well-documented conclusions, not contested claims.
At the same time, the transition is uneven. Many economies remain heavily dependent on fossil fuel revenues and fuels, and access to reliable, affordable energy remains a genuine development priority. Understanding that tension is necessary for understanding why policy debates are so difficult.
Why the distinctions matter for readers
If you are searching for "how fossil fuels are," you might be a student trying to understand basic earth science, a reader trying to follow climate news, or someone evaluating arguments about energy policy. In each case, the distinctions above help: coal is not oil, formation is not a modern process, and burning is where the carbon goes. The single most important idea is the geological timescale. Fossil fuels are concentrated stores of ancient solar energy that took millions of years to build and are being spent in a few human generations. Everything else—the economics, the politics, the environmental consequences—flows from that mismatch between timescale and speed of use.
Summary
Fossil fuels are coal, oil, and natural gas—energy-rich materials formed from ancient organic matter buried and altered over millions of years under heat and pressure. They are nonrenewable because their formation is a geological process, and their combustion releases carbon that had been stored underground, making them the primary driver of human-caused climate change. They remain deeply embedded in modern energy systems, and that is why the question of how to reduce their use is one of the central challenges of this century.