The animation at right shows how the laws of reflection and refraction follow from Huygens' principle. Huygens' principle says that the propagation of a wave can be understood as the sum of the propagations of waves--often called "wavelets"--spreading from each point on a wave front.
An incident wave (green) is represented by just two wavelets of a propagating plane wave, the plane wavefront (light green) shown as a tangent to the two wavelets. The wavefront strikes the interface with a more dense medium and, as always, there is some reflection and some transmission. But it strikes at different times, because of its angle of incidence. As soon as the left edge strikes, it spreads spherically, as Huygens' principle says, but at different speeds in the two media. The reflected wave (blue) spreads at the same speed as the incident, being in the same medium. The transmitted wave (red) spreads slower, due to the higher refractive index. Meanwhile, the right edge of the incident wave has yet to reach the interface. When it does, it also becomes spherically spreading reflected and transmitted waves, and the new wavefronts, again according to Huygens' principle, are tangents to the two spreading waves. Because the reflected waves spread at the same speed at which the incident wave moved, the reflected wavefront (light blue) moves off at the same angle at which the incident wave approached. However, because the spherically spreading left "end" of the transmitted wave moves slower in the more dense medium, while the incident wave's right end is still moving quickly in the less dense medium, the angle here is changed. The retardation of the transmitted wave's left end causes the whole transmitted wavefront (light red) to bend downward. We conclude that when entering a more dense medium, a wave bends toward the normal to the interface.
Were the second medium less dense than the first, the spherically
spreading left "end" of the transmitted wave would move
faster while the incident wave's right end moves as before. The
transmitted wave's left end would then not be retarded, but advanced,
causing the whole front to bend more to the right instead of downward.
We conclude that when entering a less dense medium, a wave bends
away from the normal to the interface.