Splitting of white light into 7 different colours is called Dispersion of white light.
Refraction of white light through a prism is the main reason, this will happen due bending of different colours by different angles by the prism
The splitting of white light into seven colours on passing through a transparent medium like glass prism is called dispersion of light. The band of colours are called spectrum. The dispersion of white light occurs because colours of white light travel at different speeds through the glass prism. When the light consisting of seven colours falls on glass prism, each colour in it is refracted by a a different angle, with the result that seven colours are spread out to form a spectrum.