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.
Okay, so just to be clear I am going to consider processes in which a photon and an atom at some energy level go in, and the photon and atom exchange energy (and momentum) such that a photon with a shifted (either higher or lower) energy comes out, while the atom ends up in a different internal electronic state than it started in. A general diagram looks like:
where non-resonant light comes in, and causes a transition between states 1 and 2 with the outgoing photon's energy also shifted in the corresponding way. I have not showed the momentum change, but that will be determined by the energies and the geometry of the situation. I've drawn this where $E_2>E_1$, but the reverse process is also possible in which the photon gains energy.
First of all, you are certainly right to wonder why this process shouldn't be allowed. As I've mentioned in a different context, a useful way to think about many physical processes, attributed to Gell-Mann, is that "everything not forbidden is mandatory." So, when the internal atomic transition + photon shift can be accomplished in a way that conserves energy, and angular and linear momentum (and also obeys some other selection rules such as those involving parity), we should expect that it is possible. And it is!
As mentioned, these processes are normally called "Raman scattering," and are an important tool in materials science for the study of vibrational levels of materials. However, to directly address the question of charles boyant, the idea of a Raman transition is more general than this. For example, in atomic physics, Raman transitions (in a slightly different form known as stimulated Raman) are often used to go between two spin states of an atom. In this case, the polarization of the photon must change along with its energy so that all conservation laws are obeyed.
Okay, so if this can happen why did you learn that atoms can only absorb light at certain frequencies that correspond to atomic transitions? There were probably two motives behind this simplification:
Although Raman processes are allowed, they generally occur with very low probability compared to absorption near a resonance, and also compared to scattering of photons without a change in photon energy. So in many cases they only have a very small impact on the overall atom-light interaction.
Because the photon never fully disappears, Raman scattering (as the name suggests) is normally thought of as an inelastic scattering process, instead of as a "partial absorption."
This way of distinguishing between absorption and inelastic scattering is particularly useful when comparing Raman processes to processes where the light is on resonance with an atomic transition. This would be the case, for example, in which the light is resonant with the 1->E transition, and the atoms can then decay both to states 1 and 2. This has a similar result to the Raman process, in the sense that photons of one energy come in and photons with a shifted energy corresponding to the difference between atomic levels come out. However, since the absorption is a resonant process, the transition strength, wavelength dependence, and actual atomic state during the process is different in these two cases.
Best Answer
The issue is that although electrons are capable of absorbing any energy greater than the minimum required to excite them, there are resonances - that is, the probability that a photon is absorbed is much greater when the energy of the photon corresponds to an exact transition. The reasons behind that are quite subtle - but that is the reason you see the lines. Those absorptions are much more probable, so photons with exactly those energies get absorbed more.