$\def\Spec{\mathrm{Spec}\ }$Let me try to add an answer with a bit more big picture. I'm not an expert here, so I'm hoping Matt E., B. and K. Conrad and others will help improve this. I'll start by outlining the proof of geometric CFT which you'll find in Serre's Algebraic Groups and Class Fields. (There is another line of proof which you'll find in, for example, David Ben Zvi's MSRI talk, and I am still absorbing.)
Theorem 1 Let $L/K$ be a finite Galois extension (with no further conditions on the fields) with $A = \mathrm{Gal}(L/K)$. Then there is an algebraic group $G$ over $K$, an embedding of $A \times \Spec(K)$ into $G$, and maps $\Spec(L) \to G$ and $\Spec K \to G/A$, such that the diagram
$$\begin{matrix}
\Spec L & \rightarrow & G \\ \downarrow & & \downarrow \\ \Spec K & \rightarrow & G/A
\end{matrix}$$
commutes, with $\Spec L$ the preimage of $\Spec K$ within $G$, and with the two actions of $A$ on $\Spec L$ (by multipication in $G$, and by the Galois action) being equal.
This sounds very technical, but you probably have seen two special cases of it.
Special Case 1 If $K$ contains the $m$-th roots of unity and $A = \mathbb{Z}/m$, then we can take $G$ to be the multipicative group and $A \subset G$ to be the $m$-th roots of unity; the theorem then says that $L$ is of the form $K(\alpha^{1/m})$ for some $\alpha \in K^{\ast}$. This is Kummer's thoerem. The maps $L \to G$ and $K \to G/A \cong G$ are given by $\alpha^{1/m}$ and $\alpha$.
Special Case 2 If $K$ has characteristic $p$ and $A = \mathbb{Z}/p$, then we can take $G$ to be the additive group and $A \subset G$ to be the elements of $\mathbb{F}_p$. Then $G/A \cong G$, with the map $G \to G/A \cong G$ being $y \mapsto y^p-y$. So the theorem says that there is some $\beta \in K$ such that $L = K(y)/(y^p-y-\beta)$. This is the Artin-Schrier theorem.
If you are familiar with the proofs of Kummer and Artin-Schrier, the proof of Theorem 1 isn't much harder.
Theorem 2 Let $A$, in the above theorem, be abelian. Then we can take $G$ to be abelian as well.
In this case, $G/A$ is itself an algebraic group, which we will call $J$.
We now specialize to the case that $K$ and $L$ are the fields of meromorphic functions on curves $X$ and $Y$ over some ground field $k$. Write $f: Y \to X$ for the covering map. We do not yet assume that $k$ is finite.
Theorem 3 We can take the group $G$ to be defined over $k$, with $A \subseteq G(k)$.
This means that we can interpret the above diagram more geometrically: We can find an open subset $X^{\circ}$ of $X$ such that, setting $Y^{\circ}:= f^{-1}(X^{\circ})$, there is a commutative diagram
$$\begin{matrix}
Y^{\circ} & \rightarrow & G \\ \downarrow & & \downarrow \\ X^{\circ} & \rightarrow & G/A
\end{matrix}$$
as before.
Now let $k= \mathbb{F}_q$ and let $F$ denote the $q$-power Frobenius.
Theorem 4 When $A$ is abelian and $k = \mathbb{F}_q$, we can find a map $h: J \to G$ such that the composites $G \to J \to G$ and $J \to G \to J$ are $F-1$.
Warning I suspect that I am missing a technical hypothesis, perhaps that $L$ and $\bar{k}$ be disjoint.
Special Cases In an Artin-Schrier extension, $G \cong J$ is the additive group $\mathbb{G}_a$ and the map $G \to J$ is $y \mapsto y^p-y$. If $m | q-1$, then $\mathbb{F}_q$ contains the $m$-th roots of unity. In the Kummer extension, $G \cong J \cong \mathbb{G}_m$, with $G \to J$ being $x \mapsto x^m$ and $J \to G$ being $x \mapsto x^{(q-1)/m}$. So the composite is $x \mapsto x^{q} x^{-1}$.
Generalizing the computation in my other answer shows:
Theorem 5 With the above hypotheses, if $D$ is a divisor supported on $X^{\circ}$, and $\bar{D}$ the divisor which it splits into in $X^{\circ}(\bar{k})$, then
$$h \left( \sum_{\pi \in \bar{D}} \pi \right) = \mathrm{Art}(D)$$.
Here the sum $\sum_{\pi \in \bar{D}} \pi$ lives in $J(\bar{k})$, the map $h$ puts it into $G(\bar{k})$, and the assertion is it is equal to $\mathrm{Art}(D)$ under the embedding $A \to G(k)$.
Examples In the Kummer case, Theorem 5 says that $\mathrm{Art}(D) = \prod_{\pi \in \bar{D}} \alpha(\pi)^{(q-1)/m}$. In the Artin-Schrier case, Theorem 6 says that $\mathrm{Art}(D) = \sum_{\pi \in \bar{D}} \beta(\pi)$.
Now, for the result which uses the most technical tools. This is basically Theorem 3.2 in Brian Conrad's notes. By the way, this works for any perfect $k$, not just a finite field.
Theorem 6 If $A$ is abelian, we can take $J$ to be a generalized Jacobian $J(\mathfrak{m}, X)$, for some conductor $\mathfrak{m}$, and $X \to J$ we can take a translation of the standard map $X \to J(\mathfrak{m}, X)^1$. Moreover, we can take the support of $\mathfrak{m}$ to be the set $S$ of critical points of $Y \to X$, and we can take $X^{\circ} = X \setminus S$. In particular, if $Y \to X$ is unrammified, we can take $J$ to be the Jacobian and $S = \emptyset$.
Warning I might be slightly missing something in the last sentence; I would have expected to see conditions like "$Y$ is geometrically connected" and "$Y(k) \neq \emptyset$" showing up.
Let me point out the subtlety of the last sentence of Theorem 6. Let $\mathrm{char}(k) \neq 2$, and let $A = \mathbb{Z}/2$. Then $L = K(\sqrt{\alpha})$ for some $\alpha$. In our high-tech language, we can take $G$ to be the multiplicative group $\mathbb{G}_m$, with $A$ embedded as $\{ \pm 1 \}$. $X^{\circ}$ is the locus where $\alpha$ is nonzero and the map $X \to G/A \cong G$ is given by the function $\alpha$ on $X^{\circ}$. Even if $Y \to X$ is an unbranched cover, the function $\alpha$ will still have zeroes and poles (of even order). We cannot map the entire projective curve $X$ to an affine group like $\mathbb{G}_m$. Theorem 6 is telling us that, by using a very different group, the Jacobian of $X$, we can arrange for the map to $J$ to be defined everywhere on $X$.
Combining Theorems 5 and 6 and the definition of $J(\mathfrak{m}, X)$, we have
Key Theorem Let $k$ be finite and $A$ abelian. Then there is a modulus $\mathfrak{m}$, supported on the ramified primes $S$ of $Y \to X$, such that
$\mathrm{Art}$ is trivial on principal ideals whose generators are $1 \bmod \mathfrak{m}$.
Now, what happens if we try to work with number fields? There are three problems. To me, Problem 1 feels the most serious.
Problem 1 The best attempt at a generalization of Theorem 3 is to replace $G$ and $J$ with group schemes $\mathcal{G}$ and $\mathcal{J}$ over $\mathcal{O}_K$. So the map $X^{\circ} \to J$ turns into a section of $\mathcal{J} \to \Spec \mathcal{O}_K$ defined on $X^{\circ}$. But this means that different points of $X^{\circ}$ wind up lying in different fibers of the group scheme, so a sum as in Theorem 6 makes no sense.
Problem 2 There is no global map $F$, so it is unclear what an analogue of Theorem 4 would look like.
Problem 3 Although the ray class groups of $K$ generalize the groups $J(\mathfrak{m}, X)(k)$, there is no algebraic group which generalizes $J(\mathfrak{m}, X)$, so it is not clear what an analogue of Theorem 6 would look like.