A water heater is a large tank usually found in the basement or laundry room, which heats cool water and pumps the heated water throughout the home. This water heater is covered if you have a home warranty, provided you perform proper maintenance on the tank. In order to do that, understanding how a hot water heater functions is imperative.While there are multiple types of water heaters, this article will focus on the two most prominent kinds: gas and electric. Gas and electric water heaters both function by bringing cold water in, heating it, and pumping it through the home. The difference between the two is what heats the water.