• Oil is formed from atomic organisms of the seas and lakes – plants and tiny animals called planktons or diatoms.
They died and sank to the bottom of the ocean or lakes.
Then they are buried by sand and mud and pressured with more layers that settled on top of this.
Consecutively, the sediments solidified into a rock and dark ooze is formed from the bacteria which ate the dead planktons.
After centuries of heat and pressure, crude oil develops. This bit isn’t very different from how coal is formed but when oil is made, natural gas-another fossil fuel- is made too. Simultaneously, both fossil fuels make their way to the surface and the oil are absorbed by porous rock such as sandstone. Occasionally, mostly when they are under pressure, non-porous rock (such as shale) trap the oil and gas.
Finally, the oil is extracted from the rocks: holes are drilled down and into the rocks to install pipes that pump it out. The crude oil is then cleaned and separated into different kinds of fuels/products like gasoline and tar to be used for and made into various things.