Let $C$ be a a projective non-singular irreducible curve under a ground field $k$. Let $D$ be a divisor on $C$ with degree 0. Does this necessarily imply that $D$ is principal? That is, $D=\text{div}f$ for some $f\in k(X)$? Also, since $C$ is birational to a curve in $\mathbb{P}^2$, can we assume WLOG that $C$ is such a curve? How does "irreducible nonsingular" help in this case?
I know that there are finitely many points $P_1, ..., P_r\in C$ that gives a nonzero contribution to $D$.
Thanks for the help.
The group of divisors modulo principal divisors is known as the Picard group; the subgroup of degree zero divisors modulo principal divisors is denoted $\newcommand{\Pic}{\operatorname{Pic}}\Pic^0(C)$. When $C$ is a smooth projective curve over a field, $\Pic^0(C)$ is isomorphic to the Jacobian variety of $C$, which is an abelian variety of dimension equal to the genus $g$ of $C$, and is birational to $C^{(g)}$, the $g$-th symmetric power of $C$.
So for a curve of genus at least $1$, it's very far from true that degree zero divisors are always principal. For example, if $P, Q \in C$ such that $[P] - [Q]$ is principal, then $P = Q$.
As for your question about curves being birational to curves in $\mathbb{P}^2$, note that most curves not of genus $0$, $1$, or $3$ are only birational to a singular plane curve, not a smooth plane curve.