Here’s a cool toy arithmetic geometry example which also explains “nilpotents”: the Chinese remainder theorem is a statement about schemes!

Recall that in general ring-theoretical form, the chinese remainder theorem says that if we have a prime factorisation of an integer

$n = \prod_{i=1}^{r} p_i^{a_i}$

then there is a ring isomorphism

$\mathbb{Z}/n\mathbb{Z} \cong \bigoplus_{i=1}^r \mathbb{Z}/{p_i}^{a_i} \mathbb{Z}$

The term on the right is both a product and coproduct (as it is a direct sum of finite indexing set) and so under the antiequivalence functor $\text{Spec}$ this transforms to

$\text{Spec}(\mathbb{Z}/n\mathbb{Z}) \cong \coprod_{i=1}^r \text{Spec}(\mathbb{Z}/{p_i}^{a_i}\mathbb{Z})$

where the coproduct is taken in the category of affine schemes (of course, I haven’t properly defined what this is yet, but in this case it is not too different to what you might expect). Then this, along with the canonical quotient map $\mathbb{Z}\rightarrow\mathbb{Z}/n\mathbb{Z}$ imply that there is closed immersion

$\coprod_{i=1}^r \text{Spec}(\mathbb{Z}/{p_i}^{a_i} \mathbb{Z})\hookrightarrow \text{Spec}(\mathbb{Z})$

But what does the scheme on the left look like?

Well, the rings $\mathbb{Z}/{p_i}^{a_i}\mathbb{Z}$ are definitely not integral domains because they contain nilpotent elements; in particular the image of $p_i$ is nilpotent since by definition $p_i^{a_i} \equiv 0 \pmod{p_i^{a_i}}$. So the ideal $(0)$ is not a point in any $\text{Spec}(\mathbb{Z}/{p_i}^{a_i}\mathbb{Z})$. Recall that the prime ideals of $\mathbb{Z}/{p_i}^{a_i}\mathbb{Z}$ are precisely the prime ideals of $\mathbb{Z}$ containing $(p_i^{a_i})$. But the only prime ideal of $\mathbb{Z}$ containing $(p_i^{a_i})$ is $(p_i)$.

Hence $\text{Spec}(\mathbb{Z}/{p_i}^{a_i}\mathbb{Z})$ only has one point, namely $(p_i)$. So the underlying topological space is exactly the same as for $\text{Spec}(\mathbb{F}_{p_i})$ and in fact for any other field. But the difference lies in the structure sheaf – in particular, the ring of global sections is $\mathbb{Z}/{p_i}^{a_i}\mathbb{Z}$ which contains nilpotent elements.

People tend to think of these nilpotent elements as “fattening” the single point of these topological spaces by an infinitesimal neighbourhood because they correspond to “functions” on $\text{Spec}(\mathbb{Z}/{p_i}^{a_i}\mathbb{Z})$ which are not quite zero but can be thought of as “close” to zero, in that application of them several times reduces to zero. This is a sort of formal version of the situation in analysis – if a number $\epsilon$ is very close to zero in absolute value, we may ignore terms containing $\epsilon^2$ and higher powers which will vanish much more quickly as $\epsilon \rightarrow 0$.

So this means in the situation above that we have a scheme with underlying topological space containing $r$ points – the $r$ prime ideals $(p_1), \dots, (p_r)$ of the corresponding rings, and each point carrying with it an infinitesimal neighbourhood of “radius” $a_i$. Here’s the picture:

Here the blue bits correspond to the points of the underlying topological spaces, and the red bits denote structure sheaves. In particular the more red loops on a point, the greater the “degree” of nilpotents in the ring of global sections. Also sneakily shown is the ring $Q$ arising as the ring of global sections of the generic point $(0)$ which is squished out along the line of $\text{Spec}(\mathbb Z)$.

This allowance of nilpotents in the structure sheaf underlies many subtleties in the geometry of schemes, but also means we can use them for very general things in the far-off realms of number theory.

But wait, there’s more! The example above illustrates an important “fibering” property of scheme morphisms. Recall that for all rings $R$ and all schemes $X$ there is a natural bijection

$\text{Mor}(X, \text{Spec}(R)) \cong \text{Hom}(R, \mathcal{O}_X (X))$

Now the ring $\mathbb Z$ is the initial object in the category of commutative rings, so by the above bijection it follows that $\text{Spec}(\mathbb Z)$ is the terminal object in the category of schemes, so every scheme has a unique morphism to $\text{Spec}(\mathbb Z)$. In the example above, each point $x= [(p_i^{a_i})]$ in $\text{Spec}(\mathbb{Z}/n\mathbb{Z})$ maps to the point $y=[(p)]$ in $\text{Spec}(\mathbb Z)$ such that $p$ is the characteristic of the residue field

$k(x) = \mathcal{O}_{X,x}/\mathfrak{m}_x$

where in this case $\mathcal{O}_{X,x} = \mathbb{Z}/{p_i}^{a_i}\mathbb{Z}$ and $\mathfrak{m}_x$ is its unique maximal ideal (which in this case is the ideal generated by $(p_i)$). Hence every scheme $X$ can be considered as a sort of “topologically fibered object”  where each fiber consists of points whose residue fields have a fixed characteristic, either 0 or a prime number.