Oil is one of three fossil fuels found in the earth’s surface formed about 300 millions of years ago before the time of the dinosaurs during the Carboniferous Period. At the time, the land was covered with swamps filled with huge trees, ferns, large leafy plants and rich vegetation. The oceans were filled with algae another form of vegetation made up of billions of tiny plants. On the land, as the trees and plants died and fell to the bottom of the swamp, they formed layers of a spongy material known as peat.
More: continued here