When a potential difference is applied across a resistor, the energy transferred from the battery into the resistor causes the atoms in the resistor to vibrate more rapidly. As they do so, some of their kinetic energy is converted into thermal energy which increases the temperature of the resistor.