Rainbows occur when rays of sunlight strike droplets of water in the air. The droplets of water act as prisms. They disperse the light and separate the colors.
Rainbows always appear opposite the Sun. To see a rainbow the sun must be at your back, opposite the direction you are looking.
For a rainbow to occur there must be both sunlight and raindrops falling from the sky. The white light of the Sun hits the millions and millions of falling raindrops. When the white light enters each raindrop it refracts off the inside of the raindrop.
The white light we see as sunlight is actually made up of seven differently colored light wavelengths that we normally cannot see. Those light wavelengths are red, orange, yellow, green, blue, indigo, and violet. When sunlight is refracted by a raindrop the light is dispersed and separated into the seven color wavelengths. When the seven colors are spread out into the sky they form a color spectrum that we call a rainbow.
A single rainbow has red on the outside and violet on the inside and the other colors in between. Every now and then, a second rainbow forms on the outside of the first, with its colors reversed, red on the inside and violet on the outside. Rarely, as many as five rainbows can be seen side-by-side.
Rainbows are always less than half a circle because the ground gets in the way. The arc of a rainbow is the colors that are visible above the horizon. If you were high above the earth with the Sun to your back looking down through falling raindrops, you would see the rainbow as a full circle.