Refraction is the bending of light when it travels from one medium to another.$^1$
The medium of lower density is the Rarer medium.
The medium of higher density is the Denser medium.
This is the relative comparison of the mediums.
Refraction depends on the difference of the densities. The greater the difference, the greater the refraction.
A light ray going through the denser medium goes slower, and faster through the rarer medium.
Depending on whether the light ray is going from a denser to a rarer medium or the other way, will change the direction where the refraction happens.
SFA, Slower to Faster bends Away from the normal.
FST, Faster to Slower bends Towards the normal.
When the light goes to a new medium, the speed and wave length changes and the frequency is the same.
$$ f= \frac{v}{\lambda} $$
From this we can understand that when the speed increases, the wavelength decreases and vice versa.
Refractive index is the amount of refraction taking place when a light ray travels from one medium to another. In other words, it measures the refraction taking place.
This means that it is relative to the two mediums.
From Snell’s Law we know that: