WATER HAMMER'(1) Very rapid pressure wave in a conduit due to a sudden change in flow; the potentially damaging slam, bang, or shudder that occurs in a pipe when a sudden change in water velocity (usually as a result of too-rapidly starting a pump or operating a valve) creates a great change in water pressure. (2) A banging noise in steam pipes, caused by steam bubbles entering a cold pipe partially filled with water.
I take it you mean pipe hammer.This is generally caused by a hot substance going through cold pipe work the knocking is caused by a rapid expansion of metal due in the introduced heat.In a steam system this can cause a pipe fracture!