In the book The geometry of schemes by Eisenbud and Harris, at page 27 we find the exercise asserting that
Exercise I.XXXVI.
The underlying space of a zero-dimensional scheme is discrete; if the scheme is Noetherian, it is finite.
Thoughts
I thought that a zero-dimensional scheme is one such that, in every local ring $\mathscr O_{X,p}$, the only prime ideal is its unique maximal ideal $\mathfrak m_{X,p}.$ Hence, supposing that $X=\operatorname{Spec} R$ is affine, we deduce that every prime ideal is maximal, so each ponit in $X$ is closed. But how does this imply the discreteness? It only implies the Hausdorff-ness of $X$, right?
Furthermore, I cannot perceive what the "Noetherianity" has to do with the finiteness claimed here. In the affine case, it seems to be claiming that there are only a finite number of prime ideals in a Noetherian ring, if its scheme is zero-dimensional? For example, $\mathbb Z$ is a Dedekind domain, hence its scheme is zero-dimensional, but it has infinitely many primes: does this contradict the statement?
Thanks in advance for any reference or hint, and point out any inappropriate point if any is presented.
Edit I see why my example cannot work now: it is one-dimensinoal: don't forget the pirme $(0)$. But I am still wondering why the statement is true...