Light, the classical electromagnetic wave, consists of an enormous number of photons in a quantum mechanical super-positions which build it up.
Photons are quantum mechanical entities. They may interact in three ways:
Elastic scatter, inelastic scatter, absorption in an atom by exciting electrons to higher energy levels.
In a transparent medium all three may happen, but the highest probability is an elastic scattering of each photon with the lattice of the medium, if there is no frequency change; inelastically again with the total lattice of the transparent medium if there is a color change. If the dominant mode is absorption by energy levels in the atoms, then it is no longer a transparent medium. It might be opaque.
The speed of light is slower than in vacuum because the photons do not follow the optical ray path within the medium in building up the classical light. They have longer effective paths due to the elastic scatter. They still build up the classical wave but the effective group velocity of light gets smaller.