A loud bang, especially right when a washing machine, dishwasher, or a quick-closing faucet valve shuts off, is water hammer. It happens when fast-moving water in the pipe is suddenly stopped, and the momentum has to go somewhere — it slams the pipe against framing or fittings. Older homes sometimes had air chambers built in to cushion exactly this, and those chambers can waterlog over time and stop working. A water hammer arrestor — a small device installed at the fixture or supply line that absorbs the shock — is the standard fix, and it's a worthwhile addition anywhere the banging is frequent or loud enough to be jarring.
A whistling or high-pitched sound while water is running, rather than at shutoff, usually means a partially closed valve somewhere in the line, or a worn washer inside an older compression-style faucet vibrating as water squeezes past it. It's a different mechanism from water hammer and a different fix — the valve needs to be checked and opened fully, or the washer needs replacing.
A ticking or clicking sound, often as the house warms up or a water heater cycles, is usually thermal expansion — pipe expanding slightly as hot water moves through it and rubbing or shifting against framing, joist hangers, or other pipes. It's typically harmless on its own but can indicate pipe that isn't adequately secured or cushioned where it passes through framing, which is worth checking so the friction doesn't wear a spot thin over years.

