The classic rainbow is a single, brightly colored arc. Red is the outermost color of this arc, and violet is always innermost.
On occasion, you may see two rainbows at once. The lower rainbow is the primary rainbow, and the higher, more faintly colored arc is the secondary rainbow. The color sequence of the secondary rainbow is opposite to the primary; red is on the inside of the arc and violet is on the outside.
To form a rainbow you need large drops of water, the sun at your back and at the correct angle. Raindrops act as prisms, bending and reflecting the sunlight that falls on them; just like a crystal hung in a sunny window.
As light enters water, the path it takes changes. How much the direction changes is a function of the color of the light. You probably noticed that a smooth water surface can act like a mirror and reflect light.
If the light beam entering the raindrop reaches the back of the drop at a certain angle, it undergoes a reflection and heads back toward the sun. Sometimes the light reflects twice off the back of the raindrop; this leads to the secondary rainbow. As the light exits the raindrop and re-enters the air, its path bends an amount that again depends on the color. This bending of the light as it enters and leaves the drop disperses the light of the sun into its spectrum of colors that form the rainbow.
A rainbow is located opposite to the sun; this explains why rainbows are not seen at noon with the sun overhead. There needs to be a clear path from the sun to the rain falling from the cloud. If the sun is overhead and raining, you are probably standing in the rain with the cloud obscuring the sun.