The splitting of white light into its individual colours is a process known as light dispersion. The spectrum is the collection of seven colours that results from splitting of white light.
While the velocities of the individual colours that make up white light are the same in a vacuum, they differ when the light travels through a transparent material like a glass prism. Different colours are distorted at the prism’s first face at various angles. Red has a minimal angle deviation while violet has a maximum angle deviation when moving at the least speed. These hues are refracted by the rules of refraction when they reach the prism’s other face. White light enters a prism and disperses as a result.