According to Huygens' wave theory:
\begin{itemize}
\item Each point on a wavefront acts as a secondary source of wavelets.
\item When light travels from a denser to a rarer medium, the speed of the wave increases.
\item The wavefront bends away from the normal due to the increase in speed.
\end{itemize}
The refractive index is given by:
\[
n = \frac{\text{speed in rarer medium}}{\text{speed in denser medium}}
\]
\[
\boxed{\sin i = n \sin r}
\]