You might have seen what happens to light when it goes through a prism. It splits into different colours. White colour is actually a mix of several different colours. The light coming from sun is white.
A rainbow is made from light and water. Sunlight is refracted (bent), reflected (bounced off the inside) and then refracted again through droplets of water in atmosphere, splitting it into the colours that we see (red, orange, yellow, green, blue, indigo and violet-VIBGYOR).
An instance of the legislation of reflection An instance of the regulation of refraction
Rainbow takes the form of a multicoloured arc. Rainbows caused by sunlight always appear in the section of sky directly opposite the sun. During rain, to see a rainbow, you have to be between the Sun and the rain (with your back to the Sun) AND for all of these to be aligned so that the Sun, your eyes and the centre of the arc of the rainbow are in a straight line! A morning rainbow appears when the Sun shines in the East, and the rain falls in the West, and an afternoon rainbow appears when the Sun shines in the West, and the rain falls in the East.
All rainbows are full circles, however, the average observer only sees approximately the upper half of the arc: 'the illuminated droplets above the horizon from the observers line of sight.
Double rainbow and supernumerary rainbows on the within of the principle arc. The shadow of the photographer's head on the bottom marks the centre of the rainbow circle.
In a "primary rainbow", the arc shows red on the outer part and violet on the inner side. This rainbow is caused by light being refracted (bent) when entering a droplet of water, then reflected inside on the back of the droplet and refracted again when leaving it.
In a double rainbow, a second arc is seen outside the primary arc, and has the order of its colours reversed, red facing toward the other one, in both rainbows. This second rainbow is caused by light reflecting twice inside water droplets.