Pipe hammer is the noise in water supply pipes of over-pressurised water running through the pipe system, and then suddenly stopping when a faucet or other water appliance is turned off -- this creates a bang or hammering noise. The problem can also be caused through air pockets getting into the pipes, and the pockets hitting pipe joints. Though devices called water hammer arresters can be installed in water lines to stop this problem, draining the pipes and lowering the water pressure is the best answer.
Turn the water off at the main shutoff valve. Open all faucets halfway in your home to drain the water pipes, and wait for all water to drain out. Also flush all toilets.
Turn the water supply back on. The water will begin to refill the pipes, forcing all air pockets out through the open faucets. Wait a few minutes, and systematically turn off all faucets from the lowest to the highest in your home, waiting for each individual faucet to stop spluttering and run a solid flow of water.
Screw a water pressure gauge by hand onto a faucet with a threaded end, and turn on the faucet -- usually an outside spigot or faucet serving a washing machine will have a threaded end. Check its reading: If the pressure is over 80 psi (pounds per square inch), the high pressure is probably helping to create the water hammer.
Locate the bell-shaped water pressure reducing valve in the water supply line, usually next to, or near, the city shutoff valve for your home. Place a crescent wrench around the locknut near the top of the valve and loosen it by turning the wrench counter-clockwise. Turn the adjusting screw (above the locknut) counter-clockwise -- again, use the crescent wrench. Go back to the pressure valve on the faucet to check the pressure -- depending on the home's position, water pressure is generally 75 psi or lower. When the pressure is at the desired lower setting, use the wrench to tighten the reducing valve's locknut by turning it clockwise. Remove the pressure gauge from the faucet.