Let me expand on my comment, with thanks to Daniel Loughran for corrections.
Of course,
If $K$ is a number field, then $\mathcal{O}_K$ is the unique ring with the following universal property:
- $\mathcal O_K$ is an integral domain.
- The fraction field of $\mathcal O_K$ is $K$
- $\mathcal O_K$ is integrally closed in $K$
- Any other integral domain $R$ with field of fractions $K$ in which $R$ is integrally closed, the canonical inclusion $\mathcal O_K \to K$ factors uniquely through the canonical inclusion $R \to K$.
Seeking a geometric interpretation of this statement, we need a geometric interpretation of each of the above properties.
A commutative ring $R$ is an integral domain if and only if $Spec(R)$ is an irreducible scheme.
Any irreducible scheme $X$ has a field of fractions $k(X)$, and if $X,Y$ are irreducible schemes, then a field homomorphism $k(X) \to k(Y)$ is known as a birational morphism. These are closed under composition and so form a category; isomorphism in this category is known as birational equivalence. This is a loosening of the notion of isomorphism of schemes; schemes which are birationally equivalent are "sort of the same, but not exactly". Given a field $K$, an irreducible scheme $X$ with $k(X) = K$ is known as a model of $K$. So $X$ is a model of $K$ if and only if $K$ is the stalk of the structure sheaf of $X$ at the generic point.
A normal scheme is "scheme language for being integrally closed". That is, a scheme is defined to be normal if and only if all of its local rings are integrally closed (in their fields of fractions). For affine schemes, this definition "globalizes": if $R$ is an integral domain, then $Spec(R)$ is normal if and only if $R$ is integrally closed (in its field of fractions).
Thus, $Spec(\mathcal O_K)$ is a normal model of $K$ with the following universal property: for any other normal model $X$ of $K$, the canonical morphism $Spec(K) \to Spec(\mathcal O_K)$ factors uniquely through the canonical morphism $Spec(K) \to X$.
Now, what is the relationship of normality to smoothness? In algebraic geometry, there are basically two notions of "smoothness". One is the relative notion of a smooth morphism. The other is the absolute notion of a regular scheme. The connection is that if $X$ is a scheme defined over a perfect field $k$, then the map $X \to Spec(k)$ is smooth if and only if $X$ is a regular scheme. But we are working over $Spec(\mathbb Z)$ and $\mathbb Z$ is not a field, so this is not true in our case.
Anyway, as explained on the wikipedia page for normal scheme, Zariski showed that a scheme is normal if and only if it is regular outside a subset of codimension at least two. So normality is a "weak smoothness condition". But since $Spec(\mathcal O_K)$ only has dimension one, the only codimension two set is the empty set. Thus in this case, normality coincides with regularity, and in the above characterization, "regular" can be replaced by "normal".