I am reading from Hartshorne, Corollary II.6.10 page 138.
Given a nonsingular (is this necessary?) curve $X$ over a field $k$, let $f\in K(X)^*\setminus k$. Then the inclusion of fields $k(f)\subseteq K(X)$ (finite field extension) induces a finite morphism $\phi:X\to \mathbb{P}^1$.
Question 1: why? For example, how is $\phi$ defined scheme-theoretically? Because Hartshorne cites what he did in Chapter I using valuations, but to me it is really unsatisfying to have to follow 100 equivalences of categories just to understand this construction (in fact I have been trying to do that many times, but always failed).
Now it is stated that $(f)=\phi^*(0-\infty)$.
Question 2: this is supposed to be obvious, but to me is not (maybe an answer to question 1 will settle this immediatly).
Also does $k$ have to be algebraically closed? I don't think so, but in chapter I it is always assumed.
Let me know if this is convincing to you. Let $Z$ be the set of zeros of $f$ and $P$ be the set of poles.
We have a map $X\backslash P\rightarrow \mathbb{A}^1$ that is defined by $k[x]\rightarrow \Gamma(X\backslash P,\mathscr{O}_X)$ where $x$ is sent to $f$.
Similarly, we have a map $X\backslash Z\rightarrow \mathbb{A}^1$ that is defined by $k[y]\rightarrow \Gamma(X\backslash Z,\mathscr{O}_X)$ where $y$ is sent to $\frac{1}{f}$.
These two maps glue together to a map $X\rightarrow \mathbb{P}^1$. From this construction, the statement that $(f)=\phi^{*}((0)-(\infty))$ can be deduced.