When a light ray goes into glass (or water)
from air it slows down. If the ray comes in at
an angle it changes direction (bends) towards
the normal. When it leaves the glass it bends
away from the normal and speeds up again.
The normal is an imaginary line perpendicular
(at right angles) to the edge of the glass.