Water Hammer occurs when you have a valve along a water pipe that closes rapidly. This effectively sets up an energy wave that travels backwards from the closed valve along the pipe and causes it to rattle and bang. You are basically taking a moving fluid and ramming it into a brick wall with no where to dissipate the energy, thus causing water hammer. This can damage your pipes, other appliances, etc. The way to fix this is to introduce a sort of "cushion" into the pipes; this has been done with vertical sealed air chambers, but this can slowly fill and require you to drain your pipes completely to re-establish the air cushion.
Our washing machine was creating a tremendous water hammer. I think it might have something to do with using stainless hoses as opposed to rubber hoses, as they have much less cushion within them to absorb some of the energy shock. I found these "shock absorbers" in a book and looked for them and found them at Lowe's.
Basically, instead of a simple air cushion, they added a piston ahead of sealed chamber of gas that allows for compression of the gas with the energy wave and then act as a "shock absorber" for the water hammer effect. As a bonus, they can be installed in any orientation because they are sealed as opposed to requiring a vertical orientation. What a great product. So shortly after installing, we ran the washer and: silence. They work like a charm. In fact, it seems like the whole washer is quieter as I think the sound of the flow across the valves is sort of absorbed by the arrestor as well. Excellent design!