A rainbow is formed due to the refraction followed by dispersion of white light ray by a water droplet in the atmosphere.
Primary rainbow is formed because of one total internal reflection and two refraction of white light by water droplet whereas secondary rainbow is formed because of two total internal reflections and two refraction of white light by water droplet.
A secondary rainbow is more brighter than primary rainbow.