Natural phenomena like rings around planets (halos) and formation of rainbow, etc. cannot be explained by the rectilinear propagation of light. To understand such events, light is considered as having wave nature.
Light waves are transverse electromagnetic waves which propagate with speed 3 ×108 ms–1 in vacuum. Of the wide range of electromagnetic spectrum, the visible light forms only a small part. Sunlight consists of seven different wavelengths corresponding to seven colors. Thus, colors may be identified with their wavelengths.
The speed and wavelength of waves change when they travel from one medium to another. The speed of light waves and their corresponding wavelengths also change with the change in the medium. The speed of a wave having a certain wavelength becomes less than its speed in free space when it enters an optically denser medium.
The refractive index µ has been defined as the ratio of the speed of light in vacuum to the speed of light in the medium. It means that the refractive index of a given medium will be different for waves having wavelengths 3.8×10–7 m and 5.8×10–7 m because these waves travel with different speeds in the same medium. This variation of the refractive index of a material with wavelength is known as dispersion.
This phenomenon is different from refraction. In free space and even in air, the speeds of all waves of the visible light are the same. So, they are not separated. But in an optically denser medium, the component wavelengths (colors) travel with different speeds and therefore get separated. Such a medium is called dispersive medium.