When you open a faucet, the flow of the water triggers the heater to
turn on. Whether you use gas or electricity, the powerful gas burners
or electrical elements will turn on, rapidly heating the water as it
passes through the unit. The water is heated instantly, and the time it
takes to obtain hot water is directly related to the distance the hot
water has to travel from the water heater to where hot water is being
used. The burners or elements then shut down when you shut off the hot
water. The energy that is consumed is only for the hot water that is
being used.