Tighten washers in faucets, which can come loose and vibrate. Water pressure flutters them, resulting in a chattering noise within pipes in the walls.
Tighten loose brackets holding the water pipes. Check the pipes in your basement, utility closet or wherever else they are easily accessible. Install extra brackets, available at retail hardware stores, wherever necessary. You eventually might have to open up the wall to install or tighten brackets, but try less expensive alternatives first.
Wrap pipes with insulating material wherever they are in close contact with wall and ceiling elements, such as wood studs. Insulating material, such as foam cylinders designed to shield hot-water pipes, absorb pressure and minimize rattling.
Hire a plumber to install a water hammer muffler, which provides a cushion of air to absorb the shock waves that cause the hammering sounds. Depending on the location and scope of the problem, the plumber might have to install fixtures at the beginning and end of a pipe, for example, at a sink faucet and the main water pipe entering your home. These repairs might require opening up walls and ceilings.