When white light is incident on the first surface of a prism and enters in glass, light of different colours due to different speeds in glass, is refracted or deviated through different angles. Thus the dispersion of white light into its constituent colours takes place at the first surface of prism.
On the second surface, only refraction takes place and different colours are deviated through different angles. As a result, the colours get further separated on refraction at the second surface (violet being deviated the most and red the least).