When a faucet is closed suddenly, air becomes trapped in the plumbing. High water pressure then compresses the trapped air to a point where the compression suddenly springs back. This causes a violent hydraulic shock wave, resulting in a banging noise. An air lock in your pipes might even stop airflow altogether and prevent a faucet from working. If this happens frequently, the clamps holding pipework may loosen, and, if left unchecked, pipe failure may result. The best solution is to install water hammer arresters. If this only happens occasionally or you need a quick fix, you can eliminate an air lock with a few simple tricks.
Attach one end of a long hose pipe to a cold water faucet on a lower level — a suitable place is a washing machine inlet or kitchen faucet. Feed the hose up to the blocked faucet. Turn the water on until it comes out the other end to eliminate air inside the hose.
Open both faucets. Household water pressure will force the blocked air back out of the pipes. Allow the pressure to equalize for half an hour, and then turn off the affected faucet. Turn off the lower faucet. Undo the hose from the higher faucet and then from the lower faucet to drain off the water.
Repeat Step 2 two or three times if the first attempt had little effect. If the problem persists, go on to Step 4.
Turn the main house water shut-off valve to the "Off" position. This valve is located downstream of the water meter connected to the water main inlet.
Open all the faucets in the household and the outside water bib, and flush all the toilets to drain off the water. Once the water has stopped flowing, close all the faucets and then open them a half-turn. Repeat this step, this time opening the faucets a three-quarter turn.
Open the main shut-off valve to allow the main water pressure to evacuate all the air inside your plumbing. When all the faucets are flowing freely with no trace of air bubbles, start with the lowest faucet and work your way upward until all the faucets are closed. Open each faucet in turn to see that they are all working properly.