Despite the popular beliefs that oil and gas came from dinosaurs, Tyrannosaurs Rex did not have a lot to do with forming fossil fuels.
Fossil fuels are crude oil, natural gas, and coal.
There are two theories about how crude oil and natural gas were formed. Some scientists believe that petroleum is the result of the decomposition of plants and animals, while others suggest that decaying plants and animals had nothing to do with it. The organic theory says that oil and gas were formed from the remains of plants and animals. Scientists, who support this theory, think that oil and gas were formed from the remains of small or microscopic plants and animals that lived in prehistoric rivers and seas. When these plants and animals died they combined with mud, silt, and sand to form layers of the mixture called sediments.