Refraction is the change in direction of a light ray as it passes from one medium—like water—into another medium—like air—where the velocity of light is different.
As the wave front passes through the boundary at an angle, the part in the second medium is either sped up or slowed down. This causes the surface normal—the light ray—to change direction.