A rainbow is formed when lights hits water droplets in the air and is refracted, or bent.
Light appears white (like from the sun) is actually made up of several colours!
The colours that make up white light are the same colours that make a rainbow. They are: red, orange, yellow, green, blue, indigo and violet.
You can see a rainbow after it rains. Beams of sunlight shine towards the rain in the air and when the light goes into the raindrops, it is bent (refracted).
When the light bends, it breaks into all of its colours. Each colour leaves the raindrop at its own angle, different from all the others.
The colours of the rainbow always appear in the same order because each colour always bends at the same angle.