A thermostat attached to the heating element turns off the heating element as needed to prevent overheating the water in the metal tube (overheating would produce only steam in the supply hose), then turns back on when the water cools below a certain threshold.