When white light enters a glass prism, it refracts. Different colors (wavelengths) of light travel at varying speeds within the prism, leading to dispersion. This creates a spectrum of white light, revealing the visible spectrum's colors: red, orange, yellow, green, blue, indigo, and violet.