By far the stronger of the two processes is the Stokes scattering, whereby the photon is scattered at lower energy (shifted wavelength towards the red end of the spectrum) - Since at room temperature the population state of a molecule is principally in its ground vibrational state this is the larger Raman scattering effect. (see the diagram above)
A small number of molecules will be in a higher vibrational level, and hence the scattered photon can actually be scattered at a higher energy, (a gain in energy and a shift to higher energy and a blue shifted wavelength). This is the much weaker Anti-Stokes Raman scattering.
The incident photons will thus interact with the present molecule, and the amount of energy change (either lost or gained) by a photon is characteristic of the nature of each bond (vibration) present. Not all vibrations will be observable with Raman spectroscopy (depending upon the symmetry of the molecule.) but sufficient information is usually present to enable a very precise characterization of the molecular structure.
Hence, the amount of energy shift for a C-H bond is different to that seen with a C-O bond, and different again to that seen with a Metal-O bond. By looking at all these various wavelengths of scattered light, one can detect a range of wavelengths associated with the different bonds and vibrations, for a table of Raman band positions click here.