The energy carrying photons are incident on an elastic surface. They are (reflected) scattered in multiple directions back in to the medium in an elastic way. So the medium does not absorb any energy. The scattered photons carry the same energy and frequency as those in incident light.
Rayleigh scattering occurs only when light rays are incident on tiny particles around the size of the wavelength of the light waves. If the particles are large, then Rayleigh scattering does not occur, normal reflection or refraction of light occur.
Raman effect or Sir CV Raman scattering of light :
This is the inelastic scattering of light waves. When light rays with photons are incident on a medium, some of the energy is absorbed. This energy causes some electrons in the atoms or molecules of the medium to be excited and jump the energy gap. So they go into higher vibrational modes and higher energy state. Then photons with less energy (than the incident photons) are emitted (scattered) back again in all directions from the medium.
The frequency and energy of the scattered photons is characteristic of the medium, and it depends on the energy gap of the outermost shell electrons. Thus the substance (element) can be identified using Raman effect.
The number of photons with inelastic scattering (Raman effect) are very few as compared to the total number of photons incident. The effect is so important in identifying elements that it has been awarded the Nobel prize.