We can prove this if you dont understand the formula.
Suppose $M$ is a point object at an actual depth $MA$ below the free surface of water $XY$ in a tank.
A ray of light incident on $XY$ normally along $MA$ passes straight along $MAA'$.Another ray of light from $M$ incident at $\angle i$ on $XY$,along $MB$ gets deviated away from normal and is refracted at $\angle r$ along $BC$.If we produce $BC$ we will find that it meets $OA$ at $L$.Therefore $L$ is virtual image of $M$ which appears when we see from $C$.Now the apparent depth is $AL$.
$$\angle AMB=\angle MBN'$$
$$\angle ALB= \angle NBC$$
In ∆$AMB$, $$\sin i= \frac{AB}{MB}$$
In ∆$IAB$,$$\sin r=\frac{AB}{LB}$$
Now, $$^a\mu_w =\frac{AB}{LB}×\frac{MB}{AB}=\frac{MB}{LB}$$
Suppose that $\angle i\rightarrow0$ then B will near A
Therefore, $$^a\mu_w=\frac{MA}{LA} =\frac{real~depth}{apparent~depth}$$