Light is made up of different colors with unique wavelengths. When light moves from one medium to another like air to glass, it changes speed which causes it to bend or refract. For example, white light hitting a prism refracts each color at a different angle, splitting the light into a rainbow spectrum of colors.