A small, spherical droplet of water acts as a tiny prism. Just like a glass prism, it refracts the incoming sunlight, disperses it into its spectrum of colors, and then reflects it internally to direct the separated colors towards the observer's eye.