Classically, light is an electromagnetic wave. When the oscillating electric field goes through a dielectric material, the electric field causes the charges in the material to move, which creates a temporary dipole moment which opposes the electric field. The electric field is generated by a changing magnetic field, but because of the material, the electric field is weaker. Because of conservation of energy, the energy of polarization of the material contains the rest of the energy, and this energy is released back into the wave. But it slows down the propagation of the wave, as the light wave has to push the charges in the material around as it passes.
For dispersive media, "speed of light" is ambiguous. Do you mean the phase velocity, the group velocity, or the signal velocity of light? The phase and group velocities can exceed c, but the signal velocity is always <= c.
Quantum mechanically, the photon becomes a quantum of oscillation in the electromagnetic field superposed with oscillation in the charges in the material. A "particle" in quantum mechanics is allowed to be built out of different pieces, like Frankenstein's monster. I don't know if this means that the photon picks up a rest mass. It's beyond my ken.