Refraction is the process by which a ray of light changes speed (refracts) when passing between two different mediums (materials).
This speed change can cause the light to change direction as it passes into different mediums.
The following video shows a brief introduction to Refraction.
In a semi-circular block, refraction occurs. This is because the light entering the curved side of the block enters along the normal, so no refraction occurs. Refraction only occurs at the plane glass boundary.
If we look closely at the transition from air to glass, we can see that the angle of Incidence is less than than the angle of Refraction.
This is because when the ray of light enters the less dense air it speeds up and it changes direction away from the Normal.
When a ray of white light passes through a Triangular Prism, the ray is refracted twice. The overall effect of these refractions is to cause the white light to be dispersed. This causes a spectrum to be observed:-