We usually find oil and gas trapped in porous rock that is sandwiched between layers of impervious rocks. Here are some ways that the land may be twisted, so that the oil and gas are trapped. The land may be arched. The porous rock is sandwiched between two layers of impervious rock. The gas is lightest, so it rises to the top.
Oil comes next, then water is at the bottom.
A fault is a split or a crack in the earth's crust. Sometimes, when this happens, some of the porous rock with the oil is trapped by impervious rock. The oil that's in the part of the rock that's not trapped, seeps to the surface. The land may not buckle much at all. The reef may lie fairly flat, and be covered by impervious rock.