Porosity is the property of an object that expresses the total volume of empty or pore space in the material. For rocks that contain hydrocarbon resources, porosity measures the percentage pore space occupies in a rock. A porous rock contains a large number of tiny spaces, which allows it to hold oil, natural gas or even underground water!
If an object is porous, it has a great ability to hold fluid within itself. Sponges, wood, rubber, and some rocks are porous materials. In contrast, marble, glass, and some plastics are not porous and contain very few open pockets of air (or pores).
A rock with good porosity is an important characteristic for an oil well. Generally speaking, 8% is the minimum porosity required to make a good oil well, although some wells are completed with less porosity. When oil or gas is exposed to a porous rock, it seeps through the holes in the rock and becomes contained between the grains. Due to this, there is actually no "ocean of oil" beneath ground—rather it is trapped within porous rocks such as sandstone. Reservoir rocks all have a relatively high porosity.