Let $f\colon X \to Y$ be a flat morphism of schemes of finite type over a field k. For any point $x\in X$, let $y = f(x)$.
Assume that $\operatorname{dim} Y = 0$.
Hartshorne now claims that $X_y$ is defined by a nilpotent ideal in $X$. Why?
I made the following attempt:
If $Y$ is of dimension zero, then, in the classical case, we have a variety $X$ mapping to a bunch of isolated points. Since $y = f(x)$, if we further assume that $X$ is connected, then the whole of $X$ maps to $y$. So, indeed, $X_y$ is the whole of $X$, and the whole of $X$ is defined by a nilpotent ideal.
But how does it work in the general case? How does one prove, in the scheme setting, that if $Y$ is zero-dimensional then every component of $X$ maps to a (obviously closed) point of $Y$? And how does one prove first that $X_y$ is defined by a nilpotent ideal, instead of deducing it from the fact that it is the whole space?