Water hammer can occur for any fluid, in any pipe, but the severity varies depending on the detailed conditions of the fluid and the pipe. It usually occurs in liquids, but it can occur in gases. It can cause pipes to burst and structures to collapse.