How can function fields have different degrees over the projective line

I'm confused.

Let $X$ be a curve over a field $k$. Let $K= K(X)$ be its function field. Then, $K(X)$ is a field. Each non-constant morphism $f:X\to \mathbf{P}^1_k$ gives a field extension $K(\mathbf{P}^1_k) = k(t) \subset K(X)$ of degree $\deg f$.

How is it possible that $\deg f$ can take infinitely many values? Aren't both fields fixed?

Maybe I'm not understanding the situation fully. A rational function $f$ on $X$ gives a field extension $k(t) \subset k(t,f)$ of degree $\deg f$. Maybe $k(t,f) \not= K(X)$? No...

Can somebody explain?

-
If you fix $f$, then just because you can DEFINE a number $\textrm{deg}\,f$, it means that you have only one such number. It's likely that I'm missing something in your question, can you please clarify it to me? Where did you read the sentence "$\textrm{deg}\,f$ can take infinitely many values"? The only phrase I can think about, containing both "$\textrm{deg}\,f$" and - in some sense - "infinitely many" is this one: $\textrm{deg}\,f$ is the number of preimages of a general point. Perhaps completely off the track. –  Brenin Oct 20 '12 at 12:45
I meant that there are infinitely many $f$. (I didn't mean to say that $\deg f$ can take infinitely many values. I just meant to say that the value $\deg f$ takes infinitely many values as $f$ varies.) –  Harry Oct 20 '12 at 13:20

Each choice of $f$ produces a different embedding of $k(t) = K(\mathbb{P}^1_k)$ into $K(X)$, so it's no surprise that $\deg f$ depends on $f$. In other words, writing $[K(X) : K(\mathbb{P}^1_k)]$ is an abuse of notation because $K(\mathbb{P}^1_k)$ is not literally a subfield of $K(X)$.
Here's a simple example: I can embed $k(t)$ into $k(t)$ by the identity morphism, giving a field extension of degree $1$, or I can embed $k(t)$ into $k(t)$ by mapping any rational function $f(t)$ to the rational function $f(t^2)$, thus producing a field extension of degree $2$.
Just a quick question, because I still don't understand actually. Let $\mathbf{A}^2$ be the affine plane with coordinates $(x,y)$. Let $X$ be a curve in $\mathbf{A}^2$. Let $f$ be a rational function on $X$. This sends $(a,b)$ on $X$ to $f(a,b)$. Let $t$ be the coordinate on $\mathbf{P}^1 = \mathbf{A}^1 \cup \{\infty\}$. Then, the field extension corresponding to $f$ is the embedding $k(t) \subset K(X)$ sending $t$ to .........? Does it simply send $t$ to $f$? So $t^2+1$ maps to $f^2+1$? –  Harry Oct 20 '12 at 13:26
Yes, it is the unique embedding that sends $t$ to $f$. –  Zhen Lin Oct 20 '12 at 13:54