Final answer:
Oil forms through a process called fossil fuel formation, which involves the burial and compression of organic material under layers of rock, resulting in the transformation of the material into oil and natural gas.
Step-by-step explanation:
Oil forms through a process called fossil fuel formation. Fossil fuels, including oil, are formed from the decomposed organic matter of organisms that lived in water and were buried under ocean or river sediments. Over time, heat, pressure, and bacteria combine to compress and transform the organic material into oil and natural gas. The formation of oil involves three main steps: burial under layers of rock, compression and transformation of organic material, and migration to underground rock formations called caprocks.