Projective closure of an algebraic curve as a compactification of Riemann surface

The compactification (= completion) $\bar X$ of a smooth affine irreducible algebraic curve $X\subset \mathbb A^2(\mathbb C)$ is the closure of $X$ in $\mathbb P^2(\mathbb C)$ .
Strangely but pleasantly the closure is the same in the Zariski or the transcendental topology of $\mathbb P^2(\mathbb C)$.
That closure is however in general non-smooth (more about that below) and is thus not the Riemann surface associated to $X$.
However there is a canonical way to obtain that Riemann surface:
Take the normalization $\nu:Y \to \bar X$ of $\bar X$. You obtain a normal irreducible complete algebraic curve $Y$ and the good news is that in dimension one normality is equivalent to smoothness.
So the required Riemann surface compactifying $X$ is just the complex manifold associated to the algebraic curve $Y$ .

A complement
That the compactification $\bar X$ is not smooth in general is easy to check on simple examples, as in Pavel's question.
But there is a more theoretical reason:
A smooth projective curve of degree $d$ in $\mathbb P^2$ has genus $g=\frac{(d-1)(d-2)}{2}$.
The integers of the form $\frac{(d-1)(d-2)}{2}$ are quite scarce in $\mathbb N$ whereas any integer is the genus $g$ of some complete smooth curve (for example, one lying on $\mathbb P^1(\mathbb C)\times \mathbb P^1(\mathbb C)$).
So most compact Riemann surfaces cannot be embedded in $\mathbb P^2 (\mathbb C)$ at all: this is one reason why the compactifcation in $\mathbb P^2$ of an affine plane smooth curve cannot in general be its associated compact Riemann surface.