Normally the photon wave-length is much larger than the atomic size, so in a solid the incident wave "feels" many atoms. Bound or free electrons oscillate and radiate in all directions. That is why there is a "reflected" wave when the incident wave encounters a medium. Inside the medium there are two kind of waves - the incident and the radiated one. If your medium is a metal with free electrons, the radiated wave becomes as strong as the incident one but with the opposite phase, so the resulting wave fades with depth (skin effect). Only the "reflected wave" remains.
If your medium is optically "transparent", then the internal resulting wave may propagate far in the medium but anyway it is a collective electromagnetic mode with its own properties.
Makes perfect sense (for any type of waves) but still doesn't account for the claim that the "speed of light" (as a photon) is lower in a higher-density medium.