Both coal and oil are fossil fuels. That means they’re formed from organic matter – stuff that was alive on Earth millions of years ago – that was covered by heavy layers of rock. Over time, the increased pressures and heat resulting from the overlying rock transformed the decomposed matter to coal or oil.
Both coal and oil are carbon-based fuels – they’re made up mostly of carbon and hydrogen. Coal usually forms from buried tissues of higher plants. Most of Earth’s coal originated as trees, ferns, and other tropical forest plants that lived in a warmer time in our history. That’s why the world’s coal beds are found on land.
Oil mostly originated as very simple organisms – such as bacteria, algae and plankton. This organic matter – and often the sandstone or limestone beds that hold the oil – was deposited in marine or lake basins, and in the ocean. Both oil and coal are non-renewable – once we use up all we have, it’s gone.