As the question title asks for, how do others "visualize" the finiteness of class number with algebrogeometric insight? I just think of it as a result in algebraic number theory and not one in algebraic geometry. Bonus points for pictures.

9$\begingroup$ The class number of a number field counts cusps in certain settings: ams.org/journals/proc/200813607/S0002993908092629/…. $\endgroup$– KConradOct 2, 2018 at 16:50

1$\begingroup$ Very similar to mathoverflow.net/questions/127717 . $\endgroup$– David E SpeyerOct 3, 2018 at 2:16
2 Answers
The first question to ask is how you visualize a number field, and the second is how you visualize a class group. There's more than one way to do each of these.
Schemes
What I think your question intended to refer to is the viewpoint of schemes. Let $K$ be a degree $d$ number field with ring of integers $\mathcal{O}_K$. The scheme $\operatorname{Spec} \mathcal{O}_K$ is onedimensional and regular, which suggests that it ought to be a nonsingular curve. The closed points of this scheme, which ought to correspond to points in the usual geometric sense (i.e., points on a Riemann surface), are the nonzero prime ideals of $\mathcal{O}_K$. There's also a generic point, the zero prime ideal, which corresponds to generic behavior on the curve (where generic means "at all but finitely many primes").
The points of this scheme are of a really different nature than the points we're used to looking at. The closed points, for example, can't be directly interpreted in terms of the real or complex numbers, because every morphism from $\operatorname{Spec} \mathbf{R}$ or $\operatorname{Spec} \mathbf{C}$ to $\operatorname{Spec} \mathcal{O}_K$ factors through the generic point. In fact, limiting ourselves to any one field, regardless of its characteristic, leads to similar problems. What makes $\operatorname{Spec} \mathcal{O}_K$ so useful is that it is a single object that unifies different aspects of the behavior of $K$.
Geometrically, a line bundle over a scheme $X$ is a scheme $L$ together with a morphism $\pi \colon L \to X$ such that, for some open cover of $X$, say $\{U_i\}_{i \in I}$, we have isomorphisms $\pi^{1}(U_i) \cong \mathbf{A}^1_{U_i}$ such that the induced automorphisms of $\mathbf{A}^1_{U_i \cap U_j}$ are fiberwise linear transformations. Algebraically, a line bundle is a rank one locally free sheaf (of modules over the structure sheaf of $X$). For an affine scheme $A$, this condition translates to a line bundle being a projective module $M$ over $A$. The Picard group of a scheme is the group of line bundles under tensor product. When $X$ is $\operatorname{Spec} \mathcal{O}_K$, then $\operatorname{Pic} X$ is the class group of $K$.
The Picard group, and therefore the class group, is an obstruction to global triviality. What this means in the arithmetic situation is perhaps not immediately clear, but the geometry is a good guide here. So let's consider an invertible (i.e., rank one locally free) sheaf $\mathcal{L}$ on a scheme $X$. There is a notion of a meromorphic section of $\mathcal{L}$. If $X$ is irreducible with generic point $\eta$ and satisfies mild technical hypotheses, then a meromorphic section of $\mathcal{L}$ is just a section of $\mathcal{L}_\eta$, the restriction to the generic point. Such a section determines an isomorphism $\mathcal{L}_\eta \cong \mathcal{O}_{X,\eta}$ and may be used to identify $\mathcal{L}$ with a subsheaf of the sheaf $\mathcal{K}_X$ of rational functions on $X$. Any one such identification leads to many others by postmultiplication by rational functions on $X$. Under some more mild technical hypotheses, the image of $\mathcal{L}$ is of the form $\mathcal{O}_X(D)$ for some Cartier divisor $D$, and the linear equivalence class of $D$ is independent of the chosen meromorphic section.
If we specialize all of the above to $\operatorname{Spec} \mathcal{O}_K$, then we get a geometric interpretation of nonprincipal ideal classes. A line bundle $\mathcal{L}$ now corresponds to a rank one projective module $M$ over $\mathcal{O}_K$. A meromorphic section is an element of $M \otimes_{\mathcal{O}_K} K$; such a section is the same as a homomorphism $K \to M \otimes_{\mathcal{O}_K} K$, and such a homomorphism is an isomorphism because $M$ is rank one. Using the isomorphism in the reverse direction allows us to embed $$M \hookrightarrow M \otimes_{\mathcal{O}_K} K \cong K$$ and thereby identify $M$ with a fractional ideal of $K$. As above, we may also identify $M$ with a Cartier divisor. For $\mathcal{O}_K$, such a divisor has the form $$\prod_i \mathfrak{p}_i^{e_i}$$ for some set of prime ideals $\{\mathfrak{p}_i\}_{i \in I}$. The linear equivalence class of this Cartier divisor is independent of the section, which simply means that $M$ gives a welldefined class group element.
In even more geometric terms: If $\mathcal{L}$ were a trivial bundle, it would have a nowhere vanishing section; when it is not trivial, the linear equivalence class of $D$ tells us $\mathcal{L}$ is wrapped around $X$ by telling us how sections can cross zero. (Think of a section of a Möbius strip.) A nontrivial ideal class in $\mathcal{O}_K$ tells us the same thing, but now "crossing zero" means "vanishing modulo a power of a prime ideal." The class group is a measurement of how many different ways this can happen, so it is a kind of measurement of the internal complexity of $\mathcal{O}_K$, just like, say, the Picard group of a curve.
The finiteness of the class group is not obvious from this perspective. After all, the Picard group of a curve over a field may be infinite! The schemetheoretic perspective is a good one if you are looking to generalize to, say, arithmetic surfaces. But in order to have any hope of finiteness, you need something more attuned to the situation at hand than just the language of schemes.
Geometry of numbers
The most classical way to study a number field geometrically is by the geometry of numbers. The field $K$ embeds in the real and complex numbers; if $K \cong \mathbf{Q}[x]/(f)$, then the real embeddings $K \to \mathbf{R}$ are defined by sending $x$ to a real root of $f$, and the complex embeddings $K \to \mathbf{C}$ by sending $x$ to a complex root of $f$. ("Complex root" will mean "nonreal root in the complex numbers".) Taken together, these define an interesting embedding of $K$ in $\mathbf{R}^d$ called the Minkowski embedding. A quick way to state this embedding is that it is the canonical map $$\mathcal{M} \colon K \to (K \otimes_{\mathbf{Q}} \mathbf{C})^\sigma,$$ where $\sigma$ is the complex conjugation operator on $\mathbf{C}$. The codomain is called Minkowski space. Explicitly, suppose the real roots of $f$ are $x_1, \dots, x_{r_1}$ and the complex roots are $x_{r_1 + 1}, \dots, x_{r_1 + 2r_2}$ with $\bar x_{r_1 + i} = x_{r_1 + r_2 + i}$ for all $1 \le i \le r_1$. The tensor breaks up as a product over the roots of $f$: $$K \otimes_{\mathbf{Q}} \mathbf{C} \cong \mathbf{C}[x]/(f) \cong \prod_{i=1}^d \mathbf{C}[x]/(x  x_i) \cong \mathbf{C}^d,$$ where the isomorphisms are of $\mathbf{C}$algebras. Complex conjugation on $\mathbf{C}[x]/(f)$ conjugates the scalars, hence the coefficients of $f$, hence the roots; so on the first $r_1$ coordinates of $\mathbf{C}^d$, it is complex conjugation, while on the last $2r_2$, it swaps coordinates $r_1 + i$ and $r_1 + r_2 + i$ and conjugates both. It is easy to check that $\sigma$ is a real linear transformation and an involution, and that its eigenvalues are $\pm 1$, whence the isomorphism of Minkowski space with $\mathbf{R}^d$.
The significance of the Minkowski embedding is that, for any nonzero proper fractional ideal $\mathfrak{a}$ of $K$, $\mathcal{M}(\mathfrak{a})$ is a rank $d$ lattice. That is, suppose we give $K \otimes_{\mathbf{Q}} \mathbf{C}$ the inner product $\langle x, y\rangle = \operatorname{tr}(x\bar y)$, where $\operatorname{tr}(z)$ is the trace of the linear operator "multiply by $z$." Then the restriction of this inner product to $\mathcal{M}(\mathfrak{a})$ is a positive definite bilinear form. Equivalently, the inner product induces a topology, and $\mathcal{M}(\mathfrak{a})$ is a discrete subgroup in this topology.
It's obvious that different ideals define different lattices: $\mathcal{M}(\mathcal{O}_K) \subsetneq \mathcal{M}((2))$. In fact, the latter is precisely the image of $\mathcal{M}(\mathcal{O}_K)$ under the map that doubles each coordinate. More generally, if $\mathfrak{a}$ is principal with generator $a \in K$, then $\mathcal{M}(\mathfrak{a})$ is the image of $\mathcal{M}(\mathcal{O}_K)$ under the map defined by multiplication by $a$. But if $\mathfrak{a}$ is not principal, then this is false: There is no $a \in K$ for which $\mathcal{M}(\mathfrak{a})$ is the image of $\mathcal{M}(\mathcal{O}_K)$ under multiplication by $a$. This failure is precisely quantified by the class group: The set of lattices in Minkowski space which are defined by fractional ideals, modulo the relation given by multiplication by elements of $K$, is the set of class group elements. One way to visualize the class group, therefore, is as a set of lattices modulo an equivalence relation.
We can do this quite explicitly for quadratic fields. For instance, suppose $f(x) = x^2  D$ with $D$ positive, squarefree, and $3 \bmod 4$. The ring of integers of $K = \mathbf{Q}[x]/(f)$ is generated by $1$ and the image of $x$, and the roots of $f$ are $\pm\sqrt{D}$. The image of $\mathcal{O}_K$ is therefore generated by the vectors $(1, 1)$ and $(\sqrt{D}, \sqrt{D})$, and there is an obvious fundamental domain which is a rectangle with sides at $45^\circ$ to the axes. On the other hand, if $D = 15$, then $(2, 1 + \sqrt{15})$ is a nontrivial ideal class. We have $\mathcal{M}(2) = (2, 2)$ and $\mathcal{M}(1 + \sqrt{15}) = (1 + \sqrt{15}, 1  \sqrt{15}) \approx (4.87, 2.87)$. The latter vector makes an angle of about $30^\circ$ with the first axis. The fact that this ideal has nontrivial ideal class means that there is no element of $K$ that transforms this lattice into $\mathcal{M}(\mathcal{O}_K)$.
The finiteness of the class group now has the following geometric interpretation: There are only finitely many different equivalence classes of lattices. The proof is essentially a compactness argument. Suppose we find a way to parametrize lattices; suppose further that we can attach an invariant to each lattice and that this invariant lies in a compact group; and suppose lastly that different ideal classes lie in different components of this group. Then the group of components, being compact, must be finite. This is made precise by working with adeles; the invariant is the unit norm idele class group, as mentioned in the comments to François Brunault's answer.
Historically, the finiteness of the class group was known decades before adeles were introduced, so there is surely a way to understand finiteness without understanding the adeles. But the adeles are an extremely powerful language, and they are so useful that they seem to have obliterated the older approach. They are well worth taking the time to learn.

3$\begingroup$ When you describe the class group using lattices, it'd be useful to add that not all rank $d$ lattices inside the Minkowski space are images of $\mathcal O_K$fractional ideals of $K$ (you say the class group is "a set of lattices" but that can be misunderstood as "all lattices"). You want just the lattices $\mathcal M$ whose "ring of multipliers" $\{\alpha \in K : \alpha\mathcal M \subset \mathcal M\}$ is $\mathcal O_K$ and not something smaller. Your final part, saying adeles "seem to have obliterated the older approach," is absolutely false if you want to compute anything! Have you? $\endgroup$– KConradOct 7, 2018 at 17:15

$\begingroup$ Those are good points. Regarding adeles, I was thinking of the proof that the class number is finite. I realized while writing that I had never seen an adelefree proof, and I didn't even know where to look to find one (besides historical references). But I would be happy that I'm just ignorant. $\endgroup$– OzobOct 8, 2018 at 1:51

3$\begingroup$ Almost any introductory algebraic number theory book (by Marcus, by Samuel, by Janusz, by Borevich and Shafarevich, by Milne, and so on) will give a proof of that finiteness without adeles since they don't use adeles anywhere. Such books are not historical references. You may be enlightened to read one and learn a proof of this finiteness without adeles. Have you ever seen the calculation of an ideal class group based on the approach to its finiteness using adeles? $\endgroup$– KConradOct 8, 2018 at 2:14

$\begingroup$ Ah! So my problem is really that I started as an algebraic geometer and have picked up all my number theory by accident. I had never studied enough number theory to actually care about finiteness of the class number until I wanted to learn about class field theory, at which point I jumped straight into the adeles and haven't looked back. I'll have to investigate some of those references. Thanks. $\endgroup$– OzobOct 8, 2018 at 2:50

$\begingroup$ When I first gave a talk on the class number formula and Szpiro's approach, people advised me to read Hecke's Lectures on the theory of algebraic numbers (1923, but a wonderful reference). $\endgroup$ Oct 8, 2018 at 7:39
Following ideas of Arakelov, Szpiro has shown that the finiteness of the class group of a number field $K$ follows from the compactness of a certain group of metrized linde bundles on $\mathrm{Spec}(\mathcal{O}_K)$. This group is called the compactified Picard group of $\mathcal{O}_K$. You can find some details on this point of view here and here.

4$\begingroup$ This sounds like it is in the spirit of compactness of the norm1 idele class group of a number field being equivalent to both finiteness of the class number and the Dirichlet unit theorem at the same time. So this viewpoint implies finiteness of the class group but is not equivalent to that. $\endgroup$– KConradOct 2, 2018 at 23:28

$\begingroup$ @KConrad Yes this is a packaging of these two finiteness results. I believe the proof of the compactness of the norm1 idele class group is essentially equivalent. This Arakelov approach has been generalized to other situations like (higher) Chow groups of arithmetic varieties. $\endgroup$ Oct 3, 2018 at 19:13

$\begingroup$ For convenience of the reader, here is a proof of the compactness of the norm1 idele class group: math.stanford.edu/~conrad/676Page/handouts/compactidele.pdf $\endgroup$ Oct 3, 2018 at 19:22