The following answer is much more detailed re-write from my previous answer, which some people here didn't seem to understand.
This is a difficult question to answer, and none of the answers I've read here actually answer the question. They try to give the impression that substitution of words is an explanation.
The temperature of a material is directly related to the vibrational energy of the molecules/atoms that make up the material. The molecules/atoms of solids are held in place by their mutual forces. But those forces only create a neutral position, with the vibration of interest occurring about that neutral position. How then does rubbing increase that vibration?
It's my understanding that the frequency of this vibration is fixed by quantum mechanics, well up in the multi-terahertz. and thus rubbing cannot change that frequency. However, it can change the amplitude, as I'll explain.
With the spring/mass analogy made for these phenomena, changing the amplitude and keeping frequency constant results in higher vibrational velocities, and thus higher temperatures. 104
That's the basic idea, and here are the details.
So how does rubbing change the vibrational amplitude? Answer: the atoms/molecules of both rubbing and rubbed material either physically contact those of the other material or become so close to the latter that electrostatic forces become large between the particles in both materials. Further, the displacement of the rubbing material is many orders of magnitude larger than the amplitude of vibration of the particles in both materials. Thus, whether by direct contact or close enough contact between both materials' particles, the pertinent particles in both materials are forced into displacements that are exceedingly larger than their vibration amplitudes. In fact, the forced displacement breaks some of the inter-bonds of these materials and their surfaces become worn.
Thus, a vibrating particle that is able to not be too far nudged from its neutral position will snap back to vibrate, but with now a larger amplitude, since the "initial condition" for the new vibration is larger than the amplitude before rubbing. The larger amplitudes of vibration occurring at the contacting surfaces in turn impose larger vibrational amplitudes in nearby particles, and the heating of the bulk material proceeds by diffusion.
It can be easily seen how such a process requires a transfer of energy from the rubber to the rubbed. It takes energy to increase the amplitude of vibration, in the same way it takes energy to push someone on a swing to higher amplitudes. The energy levels involved are less for those simply increasing temperatures than for those involved in breaking intermolecular and interatomic bonds, which is what occurs with abrasion, wearing, and sanding.
In the case of a gas, where it's the translational energy that defines temperature (not the internal rotational and vibrational modes) we can consider that rubbing creates a boundary layer, and in the most violent situations, creates also large turbulent eddies. But the original question regards only solids, so I'll reserve the detailed explanation of this case for a new question. 104