Answer:
These traps hold oil and gas because the earth has been bent and deformed in some way. The trap may be a simple dome (or big bump), just a “crease” in the rocks, or it may be a more complex fault
All pore spaces in the rocks are filled with fluid, either water, gas, or oil. Gas, being the lightest, moves to the top. Oil locates right beneath the gas, and water stays lower.
Once the oil and gas reach an impenetrable layer, a layer that is very dense or non-permeable, the movement stops. The impenetrable layer is called a “cap rock.”