I was reading the post:
How to prove that a compact set in a Hausdorff topological space is closed?
Quoting the accepted answer:
Fix $x\in\mathbb{X}\setminus K$. Since $\mathbb{X}$ is Hausdorff, for each $y\in K$ there are disjoint open sets $U_y$ and $V_y$ such that $x\in U_y$ and $y\in V_y$. $\{V_y:y\in K\}$ is an open cover of $K$, so it has a finite subcover, say $\{V_y:y\in F\}$, where $F$ is some finite subset of $K$. Let $$U=\bigcap_{x\in F}U_x\;;$$ clearly $U$ is an open nbhd of $x$ disjoint from $K$. Since $x$ was an arbitrary point of $\mathbb{X}\setminus K$, $K$ must be closed.
Why is $\{V_y \mid y \in K\}$ an open cover of $K$? I mean, to use compactness in the argument, we need that the set $V_y \subseteq K$, otherwise I don't see how it can be part of an open cover in the subspace $K$.