Refraction and Snell's law
Light bends when it crosses into a new material because it changes speed there, and it bends toward the normal when it slows down and away from the normal when it speeds up, by an amount that Snell's law predicts.
A worked example
Light travelling in air, where n = 1.00, strikes the surface of water, where n = 1.33, at an angle of 40.0° to the normal. Rearranging Snell's law gives sin θ₂ = (n₁ sin θ₁) ÷ n₂ = (1.00 × sin 40.0°) ÷ 1.33 = 0.483, so the refracted angle is θ₂ = 28.9°. Because the light slows down as it enters the water, the refracted angle is smaller than the incident angle, and the ray has bent toward the normal.
The mistake people actually make
Angles of incidence and refraction are always measured from the normal, the line perpendicular to the surface, never from the surface itself. If a question gives the angle between the ray and the surface, subtract it from 90° before you substitute it into Snell's law.