When white light passes through a prism, it disperses into its seven colors. Why does dispersion take place in a prism?

Different colors of light have different wavelengths and refract at different angles when passing through a prism. This causes dispersion, separating white light into its spectrum of colors.