ITDC
The shower moves away, sunlight breaks through, and a coloured arc appears over the buildings. Nothing has been painted across the sky. The rainbow is sunlight taking a route through drops of water, with you in the right place to see it.
Sunlight contains a spectrum of colours. When it enters a raindrop from the air, its speed changes and its path bends. This bending is called refraction. Different colours bend by different amounts, so the light begins to separate into its component colours.
Some of that light reflects from the back of the drop. It then bends again as it leaves the water. For the primary rainbow, the light has undergone one internal reflection. Red appears on the outer edge of the bow, while violet lies towards the inside.
Why a bow rather than a coloured patch? Each colour reaches your eyes most strongly from drops at particular angles to the direction opposite the Sun. All the suitable drops trace a circle around that direction. From the ground, the lower part is usually hidden, leaving the arc. From a high viewpoint, a whole circle can sometimes be seen.
This geometry puts the Sun behind you and the rain ahead. It also means a rainbow has no end waiting in a field. Move towards it and a different set of drops sends the right light to your new position.
Occasionally a fainter second bow appears outside the first. Its light has reflected twice inside the drops, and its colours run in the opposite order.
The seven colours learned at school are useful names along a spectrum, not seven separate strips. Between them lie many shades.
A rainbow is therefore both shared and personal: everyone can admire the shower, but the light reaching each pair of eyes follows its own path.

