As electrons move through a conductor within a circuit (or any other component), they transfer some of their electrical potential energy to the positive ions of the metal, which resist their flow, resulting in an increase in the kinetic energy of the atoms in the lattice and heating up of the wire