I'm trying to understand this through this example :
Let $F(x,y)$ be the free group on $(x,y)$
set $y_k=x^kyx^{-k}$ for $ 0 \le k$. Then the $y_k$ for $0 \le k$ are free generators for the subgroup of $F(x,y)$ that they generate. This illustrates that although a subgroup of a free group is free, the rank of the subgroup may be much greater than the rank of the whole group.
However, the theorem states that non-trivial proper subgroups of a free group would be free. How are we sure that the subgroup formed this way would be non-trivial and proper?
Also I couldn't understand how this implies the subgroup may have a larger rank.
Just consider the free group $F_m$ of rank $m\ge 3$ generated by the above elements $X=\{y_1,y_2,\ldots ,y_m\}$ within $F_2$. This group is free, because one can show that any reduced non-empty word $w$ in $X$ satisfies $w\neq _{F_2}e$ in $F_2$ (basically because certain powers of $x$ and $y$ remain present in the reduced form as word on $\{x,y\}$). By construction this group has rank $m$, and we have the embedding $$ F_m\hookrightarrow F_2. $$