Petroleum is a broad term that groups together a combination of organic liquids and gases that is formed after kerogen is heated and compressed over long periods of time. This mix can be fairly complex, but the main gaseous component of petroleum is natural gas - largely methane - whereas the main liquid component is crude oil. Crude oil itself is a complex mixture of hydrocarbons, so the exact composition of petroleum is never the same. Secondary fuels such as gasoline, kerosene, heating oil, and diesel fuel are all included in the definition of "petroleum". Petroleum traps energy, first originating from the Sun, that was captured by photosynthetic plankton in ancient oceans. Just like coal, petroleum is a type of fossil fuel.
The formation of petroleum occurred hundreds of millions of years ago during a period known as the Carboniferous period. During this time period, dead organic material accumulated and was decomposed by bacteria. Sediment - mostly mud and sand - then covered this material, creating high temperature and pressure conditions resulting in the creation of hydrocarbon molecules. The resulting materials were either liquid, gaseous, or solid. For more specific explanations of the formation of different components of petroleum, see the formation of oil or the formation of natural gas. Petroleum exists in many sedimentary rock formations, and because of its fluid nature it is able to migrate through stone and collect in porous rocks. If this petroleum within the porous, permeable sedimentary rock is contained here by a layer of impermeable rock then a trap is formed. The movement of geological structures and force of gravity cause these accumulations - called reservoirs - to lie beneath land or oceans.
Although petroleum seeps do exist, such as the one in Figure 1, they are rare. Most petroleum is collected through oil drilling. Once the petroleum has been drilled for by the oil derrick, a pump jack is used to recover the fuel. Once it has been recovered, petroleum must be separated into its different components for use. The main method of separation and refinement of petroleum is fractional distillation.
The separation of petroleum yields many useful products. These products are useful for transportation, fuel oil for heating and electricity generation, and asphalt. Products include gasoline, jet fuel (or kerosene), propane, petroleum coke, bitumen, plastics and waxes.