There are three basic forms of a structural trap in petroleum geology:
The common link between these three is simple: some part of the earth has moved in the past, creating an impedence to oil flow.
An anticline is an example of rocks which were previously flat, but have
been bent into an arch. Oil that finds its way into a reservoir rock that
has been bent into an arch will flow to the crest of the arch, and get
stuck (provided, of course, that there is a trap rock above the arch to
seal the oil in place).
Fault traps are formed by movement of rock along a fault line. In some cases, the reservoir rock has moved opposite a layer of impermeable rock. The impermeable rock thus prevents the oil from escaping. In other cases, the fault itself can be a very effective trap. Clays within the fault zone are smeared as the layers of rock slip past one another. This is known as fault gouge.
Salt is a peculiar substance. If you put enough heat and pressure on it, the salt will slowly flow, much like a glacier that slowly but continually moves downhill. Unike glaciers, salt which is buried kilometers below the surface of the Earth can move upward until it breaks through to the Earth's surface, where it is then dissolved by ground- and rain-water. To get all the way to the Earth's surface, salt has to push aside and break through many layers of rock in its path. This is what ultimately will create the oil trap.
The Paleontological Research Institution