White light is a combination of lights of different wavelengths in the visible part of electromagnetic spectrum
Light of a shorter wavelength is refracted more
When white light enters a prism, light nearer the violet end of the visible spectrum is refracted more than light nearer the red end, causing the ray to split into the visible spectrum
Since the prism is not parallel-sided, the ray exiting it does not cause it to refract back into a ray of white light, but causes the rainbow to become even more pronounced