Dispersion of Light
When light passes from air to glass it is refracted. The light changes direction - it bends or is refracted. Light is made up of a range of different wavelengths and the different wavelengths bend or are refracted by different amounts, because although light of all wavelengths in air travels with the same speed oflight in glass travels with a speed that varies with the wavelength of the light.
The white beam which enters the glass prism is separated into it's different colours - it is dispersed.
Red light bends the least and violet light bends the most.
If the dispersed light passes through a suitably positioned second prism it may recombine into white light. Alternatively we may say that the refractive indexof glass varies with the wavelength of the incident light.
The frequency does not change for light as it passes from air to glass or vice versa, though of course it is different for each wavelength or colour of light.