At school our teacher has done something similar but I didn't understand it. Could you explain?
Let $$ m,k \in \mathbb{N}^+ \qquad n \in \mathbb{N}^+ \qquad a,b \in \mathbb{R}^+$$ We have a rectangle $ABCD$. Here is what he have drawn, there is the explanation below:
We say that we divide the rectangle ($ABCD$) into small squares, each of side $\frac{1}{n}$. Since $a$ and $b$ are not necessarily integers, there may be squares that 'can't fit'. So we create points $A'$ and $C'$. $A'$ is where the last complete square ends on side $BA$ and $C'$ is where the last complete square ends on side $a\:(BC)$. These two define $D'$ too (you can see on the picture). We also create $A''$ and $C''$. $A''$ is where the square that 'hangs out' ends. $C''$ is the same but on the other side. These two create $D''$.
We say that we have $m$ complete squares on one side and $k$ complete squares on the other. Therefore, in the smaller rectangle, coloured orange, the area is $m \times \frac{1}{n} \times k \times \frac{1}{n}$. This has to be less (or perhaps equal) to the original rectangle's area, which is $ab$ (We want to prove this). The original rectangle's area has to be smaller than the one's which was coloured violet on the drawing: $(m+1) \times \frac{1}{n} \times (k+1) \times \frac{1}{n}$. Thus, we can write the system of inequalities:
$$ \begin{cases} m \frac{1}{n} \leq b < (m+1)\frac{1}{n} \\ k \frac{1}{n} \leq a < (k+1)\frac{1}{n} \end{cases} $$
Multipy
$$ m\frac{1}{n}k\frac{1}{n} \leq ab < (m+1)\frac{1}{n}(k+1)\frac{1}{n} $$
$$ mk\frac{1}{n^2} \leq ab < (m+1)(k+1)\frac{1}{n^2} $$
Putting this aside for a moment, we can look at the areas of the three rectangles. Obviously, the orange one ($A'B'C'D'$) is smaller or equal to the original one ($ABCD$) which has to be smaller than the larger one ($A''B''C''D''$). So:
$$ T_{A'B'C'D'} \leq T_{ABCD} < T_{A''B''C''D''} $$
We can rewrite the rectangles with integer sides, since we have proved already for integers:
$$ mk\frac{1}{n^2} \leq T < (m+1)(k+1)\frac{1}{n^2} $$
To be honest, at this point, I have no idea what we are doing... Why don't we say that the inner rectangle's area is $mk$, the outer one's is $(m+1)(k+1)$? Why do we even need the $\frac{1}{n}$? Why don't we use unit sided squares? Nevermind, I'll continue with what I've been showed:
$$ \left| T-ab \right| < (m+1)(k+1)\frac{1}{n^2}-mk\frac{1}{n^2} = \\ =m\frac{1}{n^2}+k\frac{1}{n^2}+\frac{1}{n^2} < \frac{a}{n}+\frac{b}{n}+\frac{1}{n}=\frac{a+b+1}{n} $$
As $n$ approaches $\infty$, $\frac{a+b+1}{n}$ approaches $0$.
$|T-ab| \rightarrow 0$
$T=ab$
$q.e.d.$
Could some one please explain to me this properly so that I can understand? I simply don't get what we're doing...

A square with side length $\frac1n$ has a size of $\frac1{n^2}$ of a unit square. This can easily be verified, since you can fit exactly $n^2$ of such small squares into a unit square. This is why the $mk$ squares constitute an area of $$ mk\frac1{n^2} $$ The same story goes for $(m+1)(k+1)$.
The general idea here is that both $T$ and $ab$, the size of the rectangle in question and the numerical figure of the side lengths multiplied, are squeezed in between two areas we know how to calculate, $T_{inner}=mk\frac1{n^2}$ and $T_{outer}=(m+1)(k+1)\frac1{n^2}$, that converge to each other as the partitioning $\frac1n$ gets finer and finer. Thus $T,ab$ are forced to converge to each other. But since the do not depend on $n$ but remain constant throughout, they must always have been equal in the first place.
BTW, I would find it natural to use $\frac1{2^n}$ rather than $\frac1n$ since then $T_{inner}$ would always be increasing with $n$ and $T_{outer}$ would be decreasing.