When light goes from glass to air, the light bends away from the normal (The angle of refraction is larger than the angle of incidence).
If you make the angle of incidence bigger, the angle of refraction also gets bigger.
At a certain angle, the refracted ray lies along the interface between the glass and the air. This angle is called the critical angle.
If the angle of incidence is increased further, the light is reflected inside the glass. This is called total internal reflection.