Does it do it when you turn the water off or as the water is running.
In the first case it is likely water hammer and there are several solutions depending on the situation.
Since you specified hot water, I am going to guess that you have air pocket type anti-hammer devices that have become saturated. That is easy to fix.
The easy way first. Start by turning off the heat to the water heater. then turn the water off at the house shut off valve and then turn on all the faucets in the house until they stop running (leave them all open to drain the pipes. Then turn the water supply back on and start turning them all off once they are getting good water flow.
Now try to make it hammer. Usually that will do it.