The moving electrons collide with the molecules of the
cable and therefore heat is produced.