White light consists of seven colors:-violet,indigo,blue,green,yellow,orange and red.The splitting up of light into its constituent colors is called dispersion.The patch of colored light obtained on a screen is known as a spectrum. The rainbow is a  natural spectrum formed by the dispersion of sunlight by tiny droplets of water suspended  in the air,usually when it rains.It is always formed in a direction opposite to that of sun.
The reason for dispersion is that a transparent medium like the droplets of water bends or deviates different colors of light by different amounts in order to form a spectrum.(in this case,a rainbow):)
The rainbow is formed when a White Beam of Light get dispersed into 7 colors...they are Violet,Indigo,Blue,Green,Yellow,Orange and Red.

We can also say forms by the Dispersion of White Light takes place.