Why does white light disperse when, passed through a glass prism?

Why does white light disperse when, passed through a glass prism ?
Using lens maker’s formula, show how the focal length of a given lens depends upon the colour of light incident on it.

The refractive index of the glass of the prism is different for different wavelengths(colours). Hence, different colours get bent along different directions. Using lens maker’s formula

As the refractive index of the medium with respect to air (medium 1) depends on the wavelength or colour of light, focal length of the lens would change with colour.