Mineral oil or petroleum is found in the strate of stratified rocks which contain limestone, shale, etc. Mineral oil was formed when large quantities of animals and vegetation got buried under the earth containing sedimentary rocks and remained there for thousands of years. The heat and pressure of the interior portion of the earth converted the buried matter into viscous liquid containing hydrocarbons i.e., mineral oil. When tectonic movement took place in the earth, it pushed this liquid to the higher strata of earth. Some part of liquid also got pushed towards the sea floor.