Let $f : X \to Y$ be a morphism of schemes. Write $\Delta : X \to X \times_Y X$ for the diagonal morphism.
The morphism $f$ is called separated if $\Delta(X)$ is a closed subspace of $X \times_Y X$.
A scheme $X$ is called separated if the terminal morphism $X \to \operatorname{Spec} \mathbb{Z}$ is separated.
Let $X$ be a scheme (resp. a locally noetherian scheme), $f: X\to Y$ a morphism of schemes (resp. a morphism locally of finite type). The following conditions are equivalent.
$f$ is separated.
The diagonal morphism $X\to X\times_Y X$ is quasicompact, and for every affine scheme $Y' = Spec A$ in which $A$ is a valuation ring (resp. a discrete valuation ring), any two morphisms from $Y'\to X$ which coincide at the generic point of $Y'$ are equal.
The diagonal morphism $X\to X\times_Y X$ is quasicompact, and for every affine scheme of the form $Y' = Spec A$ in which $A$ is a valuation ring (resp. a discrete valuation ring), any two sections of $X' = X(Y')$ which coincide at the generic point of $Y'$ are equal.
This is the valuative criterion of separatedness. See Hartshorne or EGA II for more details.
Therefore separated schemes are analogous to Hausdorff topological spaces (which are also sometimes called ‘separated’) and more generally of Hausdorff toposes. The characterization in terms of the diagonal map is precisely the same as that used for Hausdorff locales. See separated geometric morphism for more.
(…)