This occurs when a wave moves from one medium to another changing direction and wavelength.

This is known as refraction. Refraction happens when a wave enters a new medium at an angle, causing it to change speed and change direction. The change in speed causes the wave to bend either towards or away from the normal line, depending on the difference in the speed of the wave in the two mediums. This change in direction can also result in a change in the wavelength of the wave.