Fact 1: the type of material through which sound passes changes the speed at which sound travels. 
Fact 2: Refraction is the effect on a wave when there are changes in a medium.
Differences in the speed of sound cause sound waves to be refracted when passing between different media.