Oil and natural gas mainly form from microscopic plankton.
These microscopic animals, algae, and bacteria flourished in the
warm and shallow seas present millions of years ago. When
they died, they sank to the bottom of the sea where they
became covered in sediment. The oxygen-depleted ocean
floor kept bacteria from consuming the remnants of
decayed organisms and instead allowed for them
to be buried deep underground.
Plants are the main precursor component of coal. The
swampy forests of the Carboniferous Period, a time
before the dinosaurs roamed the earth, were an
excellent environment for the creation of coal. When
the plants died they fell into the water, where
decomposition was stalled because of a lack of oxygen,
allowing the plants to be buried deep in the earth
where they could be subjected to intense heat.