Electricity is used to generate heat in an electric heater. With a high resistance, the electrical energy flows through a conductor and this creates the heat. Depending on the heater, the heat is then distributed in the room by a fan, for example.