Water hammer is the bang or shudder you hear when a tap or appliance valve shuts off quickly. It's the sound of moving water slamming to a stop, and over time the shock can loosen joints and damage pipes.
Why it happens
When a valve closes fast — a dishwasher or washing machine solenoid, or a quickly-shut tap — the water's momentum has nowhere to go and hammers against the pipe and fittings. Loose pipes that aren't secured amplify the noise.
Secure and cushion
First, secure loose pipes with proper clips or padded straps so they can't rattle. Many homes have air chambers (or should have) that cushion the shock; these can waterlog over time. Draining the system (shut off the main, open the highest and lowest taps) can recharge them.
Add an arrestor
The reliable modern fix is a water hammer arrestor — a small device with a sealed air cushion installed near the offending valve, often at a washing machine or dishwasher supply. It absorbs the shock permanently and doesn't waterlog like old air chambers.