It is clearly enough to establish that such curves have the same cardinality, which must be equal to $|k|$, because the affine line has precisely this many points. There are many ways to prove this result, some more involved than others.
Assume I have a curve $C$ given by an irreducible polynomial $f$. Because $C \subseteq k^{2}$, the cardinality of the curve is bounded above by
$|k^{2}| = |k| ^{2} = |k|$,
where the latter equality holds because our field must be infinite. It is thus enough to establish that $|k| \leq |C|$.
Write down your polynomial $f$ as follows
$f(x, y) = x^{d}f_{d}(y) + x^{d-1}f_{d-1}(y) + \ldots + x^{0}f_{0}(y)$,
where we may assume that $d > 0$. Indeed, if it is not, then replace $x$ by $y$. It cannot happen that $d = 0$ in both cases since then $f$ would be constant and in particular would not define a curve. Let $A = y_{1}, \ldots, y_{n}$ be the zeroes of $f_{d}(y)$. The map $C \cap \{ (x, y) \ | \ y \notin A \} \rightarrow (k \setminus A)$ given by projecting onto $y$-coordinate is surjective, because on each line $y = c, c \notin A$, the curve $C$ is given by a positive degree polynomial in $x$ and our field is algebraically closed, so such a polynomial must have a root.
This shows that $|k \setminus A| \leq |C \cap \{ (x, y) \ | \ y \notin A \}| \leq |C|$, but $|k \setminus A| = |k|$, because they only differ by a finite number of elements. This ends the argument,