When electric charges move through a wire, they lose some of the energy to the atoms in the wire. On receiving the energy, The atoms vibrate more and more causing the wire to heat up. Some of the Electric Energy is changed to heat energy. The higher the resistance the more the heat energy. The amount of heat generated is governed by Joule's first law:
Q = I2·R·t
where Q is the heat, I is the current, R is the resistance, and t is the time. If I is given in amperes, R in ohms, and t in seconds, the units of energy for the heat will be in Joules.
Application : electric iron , heater , geyser , toaster all work on this principle