The speed of light in a medium depends on refractive index of the medium. \begin{align} \mu=\frac{\text{speed of light in vacuum}}{\text{speed of light in medium}}=\frac{c}{v} \end{align}
Consider two media of refractive indices $\mu_1$ and $\mu_2$ joined at the interface. An incident ray travelling in a medium of refractive index $\mu_1$ strikes at the interface. It crosses the interface and reach the other media (refracted ray). The direction of refracted ray is given by the laws of refraction:
The depth of objects kept in a water containers appears to be less than their real depth. This occurs due to refraction of light. The relation between apparent depth, real depth and refractive index is \begin{align} \mu=\frac{\text{real depth}}{\text{apparent depth}}=\frac{d}{d^\prime} \end{align}