A rainbow is an arc-shaped band of coloured light which is caused by the refraction, reflection and dispersion of sunlight in water droplets.
Rainbows are caused when rays of light from the sun hit water droplets which reflect some of the light back towards an observer. The water droplets are usually rain drops, but could also be spray from a waterfall, a fountain, or even fog. To see a rainbow, you must have the sun shining behind you and the water droplets in front of you.
Sunlight is made up of a spectrum of different colours that look white when we see them all mixed together. Since light travels more slowly through water than air, the light is bent as it enters the raindrop and becomes refracted splitting the light into the spectrum of colours. Some of the light is reflected off the internal surface at the back of the raindrop which works like a mirror to reverse the order of the colours to provide the familiar sequence of a rainbow.
The amount of the rainbow arc that is visible depends on how high the sun is in the sky. When the sun is very high, you may see a rainbow that only just appears above the horizon. On the other hand, if you are lucky enough to see a rainbow from a plane or the top of a mountain you might be able to see the whole circle.