Final answer:
Refraction and dispersion of light in a prism cause different colors to bend by different amounts and follow slightly different paths through the prism, resulting in the separation of colors.
Step-by-step explanation:
When light passes through a prism of glass, refraction changes the directions of different colors or wavelengths of light. The bending of the beam depends on the wavelength of the light, resulting in different wavelengths (or colors of light) being bent by different amounts and therefore following slightly different paths through the prism. This phenomenon is called dispersion. The violet light is bent more than the red, leading to the separation of colors.