Heat is transferred by conduction when adjacent atoms or molecules collide, or as several electrons move backwards and forwards from atom to atom in a disorganized way so as not to form a macroscopic electric current, or as phonons collide and scatter.