When a white light beam (sun light) passes through a prism, a continuous sequence of colours : violet, indigo, blue, green, yellow, orange and red (given by the acronym VIBGYOR). The red light bends the least, while the violet light bends the most as shown in Fig.

The phenomenon of splitting of light into its component colours is known as dispersion. The pattern of colour components of light is called the spectrum of light.
We know that colour is associated with wavelength of light. In the visible spectrum, red light is at the long wavelength end (~700 nm) while the violet light is at the short wavelength end (~ 400 nm). Dispersion takes place because the refractive index of medium for different wavelengths (colours) is different. For example, the bending of red component of white light is least while it is most for the violet. Equivalently, red light travels faster than violet light in a glass prism.
In vacuum, of course, the speed of light is independent of wavelength. Thus, vacuum (or air approximately) is a non-dispersive medium in which all colours travel with the same speed. This also follows from the fact that sunlight reaches us in the form of white light and not as its components. On the other hand, glass is a dispersive medium.