When light passes through a prism, it refracts, or bends. Different colours of light refract at different angles due to their varying wavelengths - red light refracts the least, and violet the most. This causes the light to spread out into a spectrum of colours.