Shale, marble, mudstone, slate and well-packed sandstone are all examples of impermeable rocks, which means that water cannot easily pass through them. A large number of metamorphic and igneous rocks are impermeable, as long as they are not fractured.
Permeability is determined by how connected the spaces between the individual grains in the rock are. If the spaces between the grains are interconnected well, water can pass through the rock more easily and thus it is considered permeable. However, when the grains are not well connected, the rock is considered impermeable as water cannot easily pass through. The amount of fracturing within a rock formation also plays a role in its permeability, as water can more easily pass through any cracks in it.
The size of the individual pores is a rock's porosity, which determines how well the rock can retain water. In loosely compacted sedimentary rocks and other highly permeable stones, the pores are both large and well connected. However, there are many examples of rocks that have a high porosity and low permeability, such as vesicular volcanic rocks like pumice. These rocks contain large bubbles that are remnants of gas trapped in the lava when it cooled, but the bubbles are generally not connected.