It is created by refraction, total reflection, and the dispersion of light.
The NWS defines a rainbow as follows: A luminous arc featuring all colors of the visible light spectrum (red, orange, yellow, green, blue, indigo, and violet). – Happy “rainbow season”! This time of the year, when we see consistent rounds of early evening showers and thunderstorms, we often see rainbows when the sun starts to descend lower on the horizon.