For a hydrocarbon (oil or gas) accumulation to form a source rock, reservoir rock and cap/seal rock are required. A trapping mechanism is also essential and this can be structural or stratigraphic. A source rock is made up of organic matter (from decomposing organisms that sink to the bottom of the ocean). Organic matter forms mudrock or shales over several millions of years, and the amount of organic matter in the rock can be described as 'total organic carbon (or TOC)'. Typically rocks with more that 1% TOC form good source rocks, and generate kerogen which forms petroleum after adequate burial and heating. A reservoir rock is the rock that holds the oil, typically a sandstone or limestone, and can be thought of as a sponge (in that it has space -called pores- to hold the oil or gas). Cap rocks/seals stop the oil which is held in the reservoir migrating to the sea surface, they are essentially a barrier to flow, and tend to be mudstones, shales or chalks. Faults, folds and unconformities can form structural traps, while pinch outs form stratigraphic traps. Burial, migration and time are also important for the hydrocarbon accumulation to build up.