In a metal light will interact with both the electrons in the conduction band and with the valance electrons of the metal lattice.
If the frequency is above the so-called plasma frequency the conduction band electrons can be considered free (very few collisions between oscillations). The electrons simply re-emit the light which makes the metal transparent. However, at lower frequencies like in the visible range the conduction band electrons will collide with the lattice much faster than the period of the wave and will absorb the energy without being able to re-emit energy. Basically, due to the lattice collisions the electrons can not follow the incoming light. This absorption prevents the light to penetrate the metal.
The effect of strong absorption somewhat counter intuitively leads to reflection. Because the waves do not penetrate deeply not many of the conduction electrons see the incoming wave and not that much overall energy is absorbed. Most of the energy is reflected by the first few layers of metal atoms in the lattice with a spectrum that depends on the scattering properties of these particular metals atoms.