The usual arrangement is to have a shut-off valve for the cold water feed to the water heater. The hot water out of the heater often does not have a shut-off valve. Shutting off the cold water feed to the water heater will cut off the flow of hot water from the heater because there is then no pressure to force the water out of the heater. It will be full of hot water, but the hot water will not flow out of the tank when a hot tap is opened.
Sometimes when the hot water supply is turned off and one is servicing an outlet which has no cut-offs of its own (a tub or shower often doesn't have cut-offs) one can get a reduced but continuous flow of water from an open hot tap. This results from cold water leaking into the hot piping from a leaking single handle faucet, usually the kitchen faucet. This will stop if the hot cut-off is closed where it is leaking through.
Then near where the water enters the structure from the outside there will be a cut-off valve which cuts off all cold water to the structure. This valve may be in a basement or in a box in ground outside the structure. In our 1970 slab-on-grade tract house, there is a set of valves in a box outside to shut-off water and to drain the pipes. There are long ago corroded and frozen into inoperability. I use the city cut-off in the water meter box at the street whenever I have to cut-off the water to the house.
Fifteen years ago I replaced the natural gas fired 40-gal tank heater with a gas fired tankless water heater. It is advisable (perhaps required) that tankless water heaters be fitted with a pair of shutoff valves--one in the cold feed and one in the hot output, and I purchased them and gave them to the installer.