Fracking is NOT done within or anywhere near the water table, that is to say, the layer of soil and rock holding the groundwater that interacts with surface water, also known as aquifers, or sources of potable water. In New Zealand, the water table is rarely more than 100 metres in depth.
Gas reservoirs typically lie well in excess of 1000m or 1km beneath the water table. CSG reservoirs are shallower, but are still typically 100s of metres below the water table.
In the NZ gas industry, fracking, when it is done, targets strata typically between 3000m and 4000m below the surface. The shallowest operation for gas was at 1400m depth on land in South Taranaki where the water table was 300m deep.
For CSG trials in the Waikato in 2007, the fracking was done at 380m, and the water table was 60m deep.
Fracking can only be used in a situation where the target gas-bearing rock formation is harder and more brittle than rock layers below it, and above it. In this situation, the softer surrounding rock will not crack, while the gas reservoir does crack, releasing gas into the well, and nowhere else.
In reality, these geological conditions tend to be relatively common. A gas reservoir can only function as a reservoir, over millions of years, if the rock above it is impermeable. A typical candidate for such a "cap rock" is mudstone, which is made of finer-grained sediment or material than a coal seam or gas-bearing shale, and which is softer, less brittle, and less crackable than the reservoir rock.
It is also for this reason that any water present in deeply-buried reservoir rocks, gas bearing or not, cannot and does not migrate up into the water table. That is a good thing because, generally, such water is naturally saline or mineralised.
To conclude, if the geological condtiions are not as described above, fracking will not work, and will not be carried out.
Fracking is rarely used in oil extraction because there is often little effect on the rate of flow, oil being much more viscous than gas, i.e. thicker and less able to flow. It is not used in underground coal gasification (UCG).