Let us start by analyzing the conventional electric tankless water heater. Essentially you've got a large barrel of water with a fire under it. (We will get to electric water heaters soon.) If you set the hearth right under the barrel with the chimney through the center of the barrel you then have a decent notion of how the water heats.
An electric tankless water heater operates in a way that is similar. Heating elements similar to electric stove burners are submerged in the tank and warm the water. Warming water with electricity takes considerably more since the heating elements used in tank type water heaters will not be that strong. Warming water with electricity can also be considerably higher priced.
Storage or tank-type water heaters are imperfect. Gas heaters have to have the little pilot light burning all the time, and it does use up energy, although small. It still leaks out some heat although that huge barrel of hot water is very well insulated. This is referred to as standby loss. Standby loss is what the tankless water heaters don't have.
Now tankless water heaters can be examined by us. A tankless water heater can be thought of as a long bit of pipe coiled up and put that fire over. As water flows through the tube, the fire heats up it. A never ending supply of hot water!