When a ray of light moves from one medium to other, its velocity changes. This change depends on refractive index of the medium. Light travels from denser to rarer medium, i.e.,
from medium of higher refractive index to lower refractive index. So, in second (rarer) medium, its velocity increases.