Definition. [Onto Functions] A function is called onto or surjective if every element in the codomain is the output of at least one element in the domain. That is, for a function $f: A \to B$, $f$ is surjective if for every $b \in B$, there exists an $a \in A$ such that $f(a) = b$.
To prove surjectivity, one must show how to solve the equation $f(x) = y$ for $x$ given an arbitrary $y$ in the codomain. For example, the function $f(x) = 2x + 3$ from $\mathbb{R} \to \mathbb{R}$ is surjective, because solving for $x$ gives us: $x = \frac{y - 3}{2}$. This number ($\frac{y - 3}{2}$) is a real number (that is, $x$ is in the domain of $f$ for any $y \in R$.)
However, the function $f(x) = x^2$ from $\mathbb{R} \to \mathbb{R}$ is not surjective, because no negative number is a square. Specifically, if we pick $y = -1$, we get: $x^2 = -1\Rightarrow x = \sqrt{-1}$, which isn't a real number (it's the complex number $i = \sqrt{-1}$.)
Since the $x$ we got isn't in $f$'s domain ($\sqrt{-1} \not\in \mathbb{R}$), we understand that $f(x) = x^2$ is not 'onto'.
Surjectivity guarantees that the range of the function equals the entire codomain.