A rainbow is "sunlight spread out into its spectrum of colors and diverted to the eye of the observer by water droplets," according to the The National Center for Atmospheric Research.
A rainbow is traditionally said to be made up of seven colors: red, orange, yellow, green, blue, indigo and violet. Actually, according to NCAR, "the rainbow is a whole continuum of colors from red to violet and even beyond the colors that the eye can see."
The sun is always behind you when you face a rainbow, NCAR says, while the rain or water in the atmosphere is in the direction of the rainbow.