How much water moves underground and how fast it moves depends on a number of factors. Two important factors are the porosity and permeability of the rocks.
Rocks are made up of grains or crystals that fit together. In cases where the fit is very tight and there are no gaps or pore spaces between the grains or crystals, we say that this rock has no porosity. At the other end of the scale, some rocks have lots of pore space between grains and so there is room for air, water or other liquids and gases.
The porosity of a rock varies because of the size of the grains in the rock and the shape of the grains. Another factor that affects the porosity of a rock is whether or not there is any material in the rock (or cement) to fill in the gaps between pore spaces and hold the grains together. If a rock has a lot of gaps between grains it is said to have good porosity and a lot of water can fit between the grains. A rock with good porosity can hold a lot of groundwater.