Consider the following statement: Any closed subset of a compact set is compact. A standard way to prove this statement goes like this:
Suppose $K$ is a compact set in the metric space $E$. Let $S\subseteq K$ be any closed set. Let $(U_i)_{i\in I}$ be any open cover of $S$. Then $(U_i)_{i\in I}$ and $S^c$ forms an open cover of $K$. It has a finite subcover since $K$ is compact. Then $S$ can be covered by finitely many $U_i$s.
I'm a bit confused by the proof. In particular I don't know if "closed" and "open" in the proof are relative to $K$ or $E$. I assume that the statement is saying that the subset $S$ is closed relative to $K$. Then $S^c$ is open relative to $K$. It's not necessarily open in $E$. Why can we conclude that $(U_i)_{i\in I} \cup \{S^c\}$ is an open cover of $K$?
Another question would be is compactness a relative concept (That is, if $S\subseteq K$ is compact in the entire metric space $E$, is it compact in the subspace $K$)?