It is sometimes claimed that light is slowed on its passage through a block of media by being absorbed and re-emitted by the atoms, only traveling at full speed through the vacuum between atoms. This explanation is incorrect and runs into problems if you try to use it to explain the details of refraction beyond the simple slowing of the signal.
Classically, considering electromagnetic radiation to be like a wave, the charges of each atom (primarily the electrons) interfere with the electric and magnetic fields of the radiation, slowing its progress.
The full quantum-mechanical explanation is essentially the same, but has to cope with the discrete particle nature (see Photons in matter): The E-field creates phonons in the media, and the photons mix with the phonons. The resulting mixture, called a polariton, travels with a speed different from light.
...
Light that travels through transparent matter does so at a lower speed than c, the speed of light in a vacuum. For example, photons suffer so many collisions on the way from the core of the sun that radiant energy can take years to reach the surface; however, once in open space, a photon only takes 8.3 minutes to reach Earth. The factor by which the speed is decreased is called the refractive index of the material. In a classical wave picture, the slowing can be explained by the light inducing electric polarization in the matter, the polarized matter radiating new light, and the new light interfering with the original light wave to form a delayed wave. In a particle picture, the slowing can instead be described as a blending of the photon with quantum excitations of the matter (quasi-particles such as phonons and excitons) to form a polariton; this polariton has a nonzero effective mass, which means that it cannot travel at c. Light of different frequencies may travel through matter at different speeds; this is called dispersion. The polariton propagation speed v equals its group velocity, which is the derivative of the energy with respect to momentum.