An answer from algebraic geometry is that the set of prime ideals of a ring satisfy the axioms for a closed set in a topology. My personal elaboration on this answer is the following.
To interpret a ring $R$ "geometrically" is to interpret the ring $R$ as a ring of "functions" on a "space" $X$ such that the collections of points of $X$ on which "functions" of $R$ "vanish" form interesting "geometric" objects that we thinkof as living in the "space" $X$.
Making this precise amounts to the following:
- The ring $R$ consists of functions on $X$ means that there are (surjective) evaluation maps $R\to R_x$ notated as $f\mapsto f(x)$, where $R_x$ is the set of values that the elements of $R$ can take when evaluated at the point $x\in X$. Note that for the sake of generality, we may have different sets of values possible at different points.
- We say that A function $f\in R$ vanishes at the point $x\in X$ if its value $f(x)$ at that point is the same as the value $0(x)$ of the zero element of $R$ function (this is the same as requiring that vanishing is a point-wise condition, and that $0$ vanishes everywhere).
- Further, we wish vanishing to satisfy nice properties: if a function $f$ vanishes at $x$, so does any multiple $f\cdot g$ of it, and two functions $f$ and $g$ have the same value at $x$ if their difference vanishes at $x$.
These three basic properties ensure that the evaluation maps $f\mapsto f(x)$ give each $R_x$ the structure of a quotient ring, and hence each evaluation map corresponds to an ideal of $R$. I like to call this ideal $\ker x$ because I like to think of the points on the space as the evaluation maps. Clearly, from the point of view of the ring $R$, points with the same kernels are indistinguishable, so we can in fact identify the "space" $X$ on which the ring $R$ is a ring of "functions" as simply a collection of ideals of $R$, which we designate as special point ideals.
What is interesting is that now vanishing can be easily interpreted as follows: $f$ vanishes at $x$ if and only if $f\in\ker x$ if and only if $\left<f\right>\subset\ker x$. Pushing this further, a collection of functions vanishes at a point $x$ if and only if $I=\left<f_i\right>\subset\ker x$, so a "geometric object" defined as where a collection of functions vanishes consists of the point ideals of $R$ contained in an ideal: geometric objects are specified by ideals of $R$!
Now, the geometric objects behave nicely: arbitrary intersections of geometric objects are geometric objects. Unfortunately, they are not nice enough without an extra assumption: if we want the union of two geometric objects (as collections of point ideals) to be a geometric object, then it is in fact necessary that every point ideal be prime. Once this assumption is made, we can talk about finite unions of geometric objects and arbitrary intersections of them, which allows us to talk about the geometric objects "locally": by investigating small manageable pieces of them, which we would then patch back together.