How is white light split into seven colours when passed through a prism?

     While the speed of light in vacuum is the same for all wavelengths, the speed in a material substance is different for different wavelengths. As a result, the refractive index becomes a function of wavelength.

A glass Prism deviate a ray of light passing through it, at a particular angle which depends on the refractive index. This deviation increases with increasing refractive index so violet (380 nm) is deviated the most and red (600 nm) is deviated the least with other colours occupying intermediate positions. This light emerging from a prism is split into constituent colours.