Millions of years ago, when much of the earth was a swampy forest, billions of plants and animals died and fell into the shallow water.
The oxygen, hydrogen, nitrogen, and carbon in these living things were acted upon by bacteria and pressure over thousands of years, freeing gases from the decayed matter and leaving behind only the carbon.
Coal and oil are made up mainly of carbon. The difference is that coal was under more pressure as it formed, and the carbon atoms arranged themselves in solid form.
When coal or oil burns, it combines with oxygen in the air, producing carbon monoxide and other gases. This chemical change produces a great deal of heat energy.
So when we burn coal or oil to heat or light our homes, or to heat water at electricity plants, we’re really burning the remains of plants and animals that lived ages ago!