My question refers to following older thread: Finite morphisms of schemes are closed
Let $f: X \to Y$ be a finite morphism of schemes. How the Going-Up theorem imply that this morphism is closed? Clearly we can reduce it to affine case $X = Spec(A), Y = Spec(R)$ and going up holds for finite morphisms since they are integral.
Going up says that if $p_0 \subset p_1$ are prime ideals of $R$ and $P_0$ prime ideal of $A$ lying over $p_0$ then there exists a prime ideal $P_1$ lying over $p_1$. But this just says that $f$ is surjective.
How does it imply that it is also closed?
Going up doesn't really show that $f$ is surjective¹. It shows something entirely different: The image of $f$ is closed under specialization. This means that any point $P$ of $Y$ lying in the closure of a point $Q \in Im(f)$ (one says $P$ is a specialization of $Q$) is already contained in $Im(f)$.
Note that in general closed subsets are closed under specialization, but there are "stupid" counterexamples in the other direction, like the set of all closed points of a variety. Now the fact that your set $Im(f)$ is the image of a map of affine schemes is enough to exclude such pathologies, so you get the claim.
So after this philosophical rambling let me also supply a proof: Let $Z \subset X$ be a closed subset. As the closed immersion $Z_{red} \to X$ is finite, we can replace $X$ by $Z$ and just have to show that $Im(f) =: V$ is closed in Y.
To this end we consider a prime ideal $P$ of $R$ lying in the closure of $V$, which means that any open set containing $P$ also meets $V$. Hence for any $r \in R$ with $r \notin P$ we get $$V \cap D(r) \neq \emptyset.$$
Let us translate this result into the world of rings, call $\phi: R \to A$ the ring homomorphism corresponding to $f.$ Then note $$V \cap D(r) = f(Y) \cap D_X(r) = f(D_Y(\phi(r)))$$ where I added subscripts to the distinguished opens to indicate in which scheme I am working. In particular, $D_Y(\phi(r)) \neq \emptyset$, hence the localization $A_{\phi(r)}$ is not the zero ring.
Now "not being the zero ring" is preserved under filtered colimits of rings, so we also get $$0 \neq \operatorname{colim}_{r \in R \setminus p} (A_{\phi(r)}) = \operatorname{colim}_{r \in R \setminus p} (A \otimes_R R_r) = A \otimes_R R_P.$$
Now we're almost done: Take any $Q \in Spec(A \otimes_R R_P) = Spec(A) \times_{Spec(R)} Spec(R_P)$. Projecting to $Spec(A)$ provides us with a point $Q'$ in $Spec(A)$ such that $$f(Q') \in Spec(R_P) \subset Spec(R).$$ However, the prime ideals of $Spec(R_P)$ are precisely those contained in $P$. This is the same as specializing to $P$, so $P$ is a specialization of $f(Q')$. As $Im(f)$ is closed under specialization, this gives us $P \in Im(f)$ and so $Im(f)$ is closed.
Final remarks: I took this proof from the Stacks Project, https://stacks.math.columbia.edu/tag/00HY . There is a second proof worth checking out; I wanted to present this one because it illustrates my philosophical introduction.
¹⁾ Indeed, general finite morphism are not surjective. A typical example is a closed immersion, which on the ring level is given by $A \to A/I$ - here $A/I$ is generated by its unit as an $A$-module. It might help to look at $$f: \mathbb{A}^1 \times \{0\} \hookrightarrow \mathbb{A}^2$$ and work out that $f$ satisfies going up, but is not surjective.