I should mention first that the electrons carrying the current in a metal wire would continue moving without interruption, showing no resistance, if the crystal were absolutely perfect and rigid. That sounds surprising, because you might think that electrons would bounce off the metal atoms, but the electrons actually are present as quantum waves, and these can travel through a crystal just the way light waves travel through a transparent crystal.
There are two main sources of resistance in a room-temperature wire. First, the thermal energy is present largely as little high frequency sound waves in the material- little vibrations of the atoms out of their regular positions in the crystal. The electrons tend to bounce off those irregularities. Second, there are impurity atoms and other defects which break the regular crystal pattern, and these too scatter electrons, just the way defects in glass scatter light.
When a wire gets very hot, the thermal sound becomes very important. That's why the resistance of a light bulb goes up a lot when it's on. The filament wire becomes very hot.
(published on 10/22/2007)