Most problems with water heaters are announced by noises or by water that’s either too hot or not hot enough. Often you can correct the problem yourself. A possible exception is a water leak, which may require professional service or tank replacement. Gas leaks call for immediate help from the utility company.
Whenever someone turns on a hot water faucet, heated water is drawn from the top of the tank and is replaced by cold water that is carried to the bottom through the dip tube. When the water temperature drops, a thermostat activates the heat source (a burner in a gas model — two heating elements is an electric.) A gas heater has a flue running up the center and out the top to vent deadly gasses. An electric heater needs no venting. In both, an anti-corrosion anode attracts corrosion that would otherwise attack the tank’s walls.