If an electromagnetic wave travels from one medium into another medium, it will experience refraction if the two media have different refractive indices (ie. if the wave moves faster in one of them, then it will refract at the boundary). The mathematical description of refraction is more complex than reflection, and is known as Snell’s Law.
Snell’s law can be expressed in terms of the velocity of light in each medium, or the refractive index of each medium. These are equivalent (you can easily convince yourself of this using the definition of refractive index).
The slides outline Snell’s law and include some calculations based on Snell’s law. Follow this link for an excellent animated gif file of refraction.