Updated: March 5, 2024

A Guide to the Basics of Gas, Electric, and Tankless Water Heaters

As with most amenities of the home, the less you need to think about your water heater, the better. The only truly important thing to know is that it’s working to supply your home with the hot water you need. Nevertheless, it’s always beneficial to have a basic knowledge of how your water heater works. This is especially true for a machine that is used daily.

Every time you shower, wash the dishes or do a load of laundry, your water heater is responsible for getting that water through the pipes to its proper destination, at the proper temperature.

So exactly how does a water heater work in your home?

New clean and shiny faucet on sink

Hot Water Heater Components

First, we’ll take a look at the different parts working together to produce the hot water you need. These parts are common to both electric and gas water heaters alike, with a few small differences. Perhaps this will answer your question of “how does a water heater work?”.

How Does A Hot Water Heater Work?


Most water heaters found in homes throughout the US feature large, insulated tanks which store your hot water. These water heater tanks come in different sizes, typically holding between 20 and 80 gallons. The size of the tank should correspond with the number of people in the home needing hot water, and the average household tank has a 40–60-gallon capacity.

Dip Tube

The dip tube is where cold water from your home’s municipal supply, well, or another water source, enters the tank. Your main water line splits just before the water heater. When you turn on the cold-water tap, the water is piped from the main valve through the cold-water service line. The water that comes through the hot water tap passes through the dip tube into the tank. This is before the water travels through the hot water service line. The dip tube is located at the top of the tank. The cold water enters here and then heats from the bottom of the tank.

Heating Element / Gas Burner

With an electric water heater, the water is heated within the tank by an electric heating element. With a gas water heater, a gas burner is the heating mechanism. Both are located at the bottom of the tank.

Anode Rod
The anode rod is another safety measure. It prevents the tank from rusting through electrolysis. This means that the metal-coated steel rod (generally coated in aluminum, zinc, or magnesium) rusts instead of the steel lining of the tank’s interior.


Water heaters have a thermostat on the outside that allows you to measure and adjust the temperature of the water.

Heat-Out Pipe

This is the pipe that brings hot water out of the tank to the hot water service line. It’s located at the top. As hot water has less density than cold water (and heat rises by nature), the hottest water rises to the top of the tank.


  • Drain Valve – The drain valve is located near the bottom, outside of the tank. As its name suggests, the drain valve is used to drain out sediment that builds up inside the tank.
  • Shut-off Valve – Outside of the water heater is a shut-off valve. This shuts off the flow of water into the tank.
  • Pressure Relief Valve – The water inside of the tank is highly pressurized. The pressure relief valve prevents pressure from building up to a dangerous extent.

How Does a Hot Water Heater Work?

So, how do these parts work together? How does a water heater work? Well, here’s a breakdown. Your hot water journey begins from the main water line to your shower, washing machine, sink, dishwasher, etc.

Gas and electric water heaters are both tank-type water heaters. These are the most common types of water heaters found in homes. They operate largely on the same principle, differing mainly in their respective sources of heat. The following process applies, regardless of the heating mechanism.

Water Heater unit in basement

Here’s how a hot water heater works:

Water travels through the main water line into your home. Just before the water heater, the line splits into two separate pathways which make up your home’s water intake system.

You turn on the hot water tap. Cold (but soon-to-be hot) water passes the shut-off valve, travels through the dip tube, and enters the water heater tank.

The heating mechanism at the bottom of the tank heats the water according to the thermostat setting. The water that just entered is displaced to the bottom of the tank, and the hottest water rises to the top.

So, you turned on the hot water tap, and more water entered the tank through the dip tube. Under immense pressure, hot water at the top of the tank is displaced as new cold water enters the tank. This hot water travels up through the heat-out pipe to the hot water tap.

Tankless Water Heaters

Another option, which is less common but growing in popularity, is a tankless water heater. Instead of storing hot water in a perpetually heated tank, tankless water heaters only heat water when it’s needed.

When you turn on a hot water tap, a flow sensor in the tankless water heater unit activates. If the tankless unit is gas-powered, this sensor turns on a fan inside of the unit, draws in air, opens the gas valve, and ignites the burner.

With an electric tankless unit, the sensor activates an electric heating unit. In either case, the heat exchanger inside the unit is warmed, which heats the water to a preset temperature. The water passes through the unit to the tap. This bypasses the process of storing a tank full of hot water and the energy needed to maintain a high temperature constantly.

Tankless water heaters save energy, reduce the risk of leaks, and are not constrained by a finite supply when hot water is in high demand. You can’t run out of hot water with a tankless unit, as there is no tank to be depleted. Tankless water heaters are also safer and longer lasting. However, these advantages come with a higher price tag upfront than with a conventional water heater.

Hot Water, Whenever You Need It

When you know the basic principles, a water heater isn’t too difficult to understand. If you’re having an issue with your water heater, need some general maintenance, or want to look into replacement options, you need a reliable plumber you can count on.

If you’re in South Jersey, contact Laury Heating Cooling & Plumbing for the highest quality plumbing services around!

company icon