As waves move into a denser medium, the waves slow down. This causes the waves to move closer together and the wavelength to decrease. As the wavelength gets smaller, the waves change direction towards the normal line. After the waves pass through the medium, they speed up, causing them to refract away from the normal line.