I used to believe - as did/do many others - that oil comes from dinosaurs .... well ...
Oil formed from the remains of small marine plants and animals that lived millions of years before the dinosaurs. The dead tiny organisms settled to the bottom of the sea. Bacterial decomposition removed most of the oxygen, nitrogen, phosphorus, and sulphur from the matter, leaving behind a sludge made up mainly of carbon and hydrogen.
As the oxygen was removed from the detritus, decomposition slowed. Over time the remains became covered by layers upon layers of sand and silt. As the depth of the sediment reached or exceeded 10,000 feet, pressure and heat changed the remaining compounds into the hydrocarbons and other organic compounds that form crude oil and natural gas.