The left to right implication is the easiest :
Let $A$ be countable.
- if $A = \emptyset$, we are done
- if $A$ is finite, say $A = \{a_0, \dots, a_k\}$ then the following map is a surjection $f : \mathbb{N} \mapsto A$ :
$$f : n \mapsto
\left\{ \begin{array}{ll} a_n & \textrm{if } n \leqslant k \\
a_0 & \textrm{otherwise} \end{array} \right. $$
- finally, if $A$ is equinumerous with $\mathbb{N}$ then you have a bijection $f : \mathbb{N} \mapsto A$, which is hence a surjection.
The right to left implication is the hard part :
If $A=\emptyset$ or $A$ is finite we are done. So let's assume that $A$ is infinite and we have a surjective function $f : \mathbb{N} \mapsto A$. We need to find a bijection $g : \mathbb{N} \mapsto A$.
By induction, for each $n \in \mathbb{N}$, we construct the family of functions $(g_n)_{n\in \mathbb{N}}$ satisfying :
- for each $n$, $g_n$ is an injective function $\{0, \dots n\} \mapsto A$.
- for each $m \leqslant n$, $g_n$ extends $g_m$, ie $\forall k \leqslant m$, $g_n(k) = g_m(k)$.
- for each $k \leqslant n$ , $f(k) \in \operatorname{Im}(g_n)$
If we can do that we are done since $g : n \mapsto g_n(n)$ is a bijection from $\mathbb{N}$ to $A$.
induction start We let $g_0 : \{ 0 \} \mapsto A$ be defined by $g_0(0) := f(0)$.
Induction step Let $n \in \mathbb{N}$ Suppose we have already constructed $g_0, \dots, g_n$ satisfying points 1. 2. and 3. above.
As $A$ is infinite, $g_n$ can't be a surjection (for otherwise $A$ would be finite), hence the set $X_n := \{k \in \mathbb{N} \ | \ f(k) \notin \operatorname{Im}(g_n) \}$ isn't empty. This allows us to define $g_{n + 1}(n + 1):= f(\min X_n)$.
For $k \leqslant n$, one sets $g_{n + 1}(k) := g_n(k)$.
Clearly, $g_{n+1}$ is injective and extends $g_m$ for $m \leqslant n + 1$. Let's check point 3. :
let $k \leqslant n + 1$ , then
- if $k \leqslant n$ we are done since $f(k) \in \operatorname{Im}(g_n) \subseteq \operatorname{Im}(g_{n+1})$.
- if $k = n+1$ then either $f(k) \in \operatorname{Im}(g_n)$ and we are done or we have $n + 1 \in X_n$, and since $0, \dots n, \notin X_n$ we have $n+1 = \min X_n$ hence $a= g_{n+1}(n+1)$.