The heating element of an electric heater works following the Joule's effect. In fact, the main component of the heating element is a resistor. When the heater is connected to the plug, electrical current starts flowing through the resistor. Because of the Joule's effect, the temperature of the resistor increases: therefore, the resistor gets hotter and releases heat to the surroundings.