What Causes the Clanging?
Water hammer is a common cause of banging pipes. In plumbing where water pressure is high, shutting off the tap can cause the pressure to back up and jolt the pipe, a little like slamming on the brakes in your car. The jolt can be especially violent when a solenoid-controlled appliance like a washer or dishwasher shuts the tap since the shutoff happens instantaneously.
Plumbing that's not properly anchored to the framing can rub or bang on whatever is nearby and cause a racket. All this banging and jolting can strain pipes and copper fittings and you can eventually wind up with a leak. It's best to deal with the cause of the noise wherever you have access to the plumbing.
Water Hammer Arresters
Many homes come already equipped with water hammer arresters, which are small air chambers attached above the water line to absorb the pressure of the water as it is shut off. Spiral-shaped water hammer arresters were also used years ago and you may still find them in older homes.
Cushioning Your Pipes
Plastic or nylon pipe inserts work well to cushion pipes running through framing members, but they need to be installed when you do the plumbing. For retrofitting, try pipe hangers. These plastic hooks hold the pipe off the framing and have a felt or rubber cushion to absorb any movement and prevent noise.
Checking Water Pressure
Whistling sounds are also common where a shutoff valve hasn't been opened all the way or where pressure is high. If your water pressure is excessively high, installing a pressure-reducing valve near the water meter will get rid of the noise and lower your water bill. But consult a plumber first to be sure it won't take too much pressure away from any upper-story plumbing.
For more on plumbing, consider:
How To: Solder Copper Pipe Fittings
How To: Work with Plastic Pipe
How To: Repair a Leaky Faucet