Our goal is to prove that $\aleph_1 < 2^{\aleph_0}$ in the model $M[G]$, and therefore the Continuum Hypothesis is not true in $M[G]$. This is equivalent to saying that $\aleph_2 \leq 2^{\aleph_0}$. So we need to construct a model $M[G]$ such that there is an injective map $f$ from $\aleph_2$ to $2^{\aleph_0}$ in $M[G]$. Note that each element of $2^{\aleph_0}$ is a function from $\aleph_0$ to $\{0,1\}$ (by definition). Thus $f(x)$ (the value of $f$ at point $x$) is actually a function that maps a natural number to $\{0,1\}$. In the proof, we treat $f$ as a function of two parameters
$$h(x,y) = f(x)(y)$$
where $x\in \aleph_2$ and $y\in \aleph_0$. This is the reason why we want to prove that there exist a function $h$ from $\aleph_2 \times \aleph_0$ to $\{0,1\}$ satisfying certain properties.
The choice of $\aleph_2$ here is not arbitrary. Say, if we wanted to prove that $2^{\aleph_0} > \aleph_{19}$, we would consider functions from $\aleph_{20} \times \aleph_0$ to $\{0,1\}$.
BTW, $\aleph_2^M$ is always an element of $M$ and $M[G]$ (for any generic set $G$); on the other hand $\aleph_2$ is usually neither an element of $M$ nor $M[G]$, since $M$ is a countable transitive model of ZFC (or more precisely is a countable model of a large finite fragment of ZFC). So I'm not sure what you mean in the last paragraph.