A rainbow is an arc-shaped spectrum of light which is created by refraction and reflection.
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 raindrops, 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.