## Function field of a covering

Suppose we have a ramified covering $\pi : M \to N$ of Riemann surfaces, of finite degree $n$. The function field $K(M)$ of $M$ is the field of meromorphic functions $M \rightarrow S^2$. Now, given $f \in K(N)$, we have the contravariant functor $f^* : K(N) \to K(M)$, which takes $g \in K(N)$ to $f^*(g) = g \circ \pi$. This functor allows us to consider $K(N)$ as a subobject of $K(M)$, i.e., $K(M)$ as a field extension of $K(N)$. Now I've heard that, as long as the degree of the covering is finite, then $K(M)$ is an algebraic extension of $K(N)$, and $[K(M):K(N)] = n$. This idea is very beautiful, and I've been told it's the basic idea of Grothendieck's Galois theory. It seems "obvious" to me that this is true, but I'm clueless at how one would go about proving it.

Any insight is much appreciated!