Oil and natural gas are naturally occurring substances which consist of compounds of carbon and hydrogen and are called hydrocarbons. Hydrocarbon compounds are created through the heating up of organic carbon material at high pressure, predominantly within sequences of sedimentary rocks.
(A) reservoir and sealing rocks, (B) faults, (C) rocks domed over rising salt masses,
(D) a reservoir rock of permeable river sand is sealed by clays accumulated in the swamps which formed to cover the river channel. (E) In reality most traps are formed by more complex sequence of events and cannot be classified so rigidly. For example the reservoir rock was first folded and eroded, then sealed by an impermeable rock which was deposited later over the eroded structure.
Unless they are found in their purest forms the hydrocarbons will have to be separated in order to be useable. The separation process for crude oil is called refining, which, somewhat simplified, is accomplished through the successive heating of crude oil. At every different level of heat a specific hydrocarbon is separated. The refining process continues until all hydrocarbons in the original crude oil mixture have been separated.