[proofplan]
We use only the definitions of [closed set](/page/Closed%20Set) and [cofinite topology](/page/Cofinite%20Topology). A subset $F\subset X$ is closed exactly when its complement $X\setminus F$ is open. In the cofinite topology, an [open set](/page/Open%20Set) is either $\varnothing$ or has finite complement, so applying this definition to $X\setminus F$ gives precisely the two alternatives $F=X$ and $F$ finite.
[/proofplan]
[step:Translate closedness into openness of the complement]
By definition, a subset $F\subset X$ is closed in $(X,\tau_{\mathrm{cof}})$ if and only if $X\setminus F$ belongs to $\tau_{\mathrm{cof}}$. By definition of the cofinite topology,
\begin{align*}
\tau_{\mathrm{cof}}=\{\varnothing\}\cup \{U\subset X:X\setminus U\text{ is finite}\}.
\end{align*}
Thus the proof reduces to applying this characterization to the subset $U:=X\setminus F$ of $X$.
[/step]
[step:Show that the two listed alternatives give closed sets]
Assume first that $F=X$. Then $X\setminus F=\varnothing$, and $\varnothing\in\tau_{\mathrm{cof}}$ by the definition of $\tau_{\mathrm{cof}}$. Hence $F$ is closed.
Assume next that $F$ is finite. Define $U:=X\setminus F$. Then
\begin{align*}
X\setminus U=X\setminus (X\setminus F)=F.
\end{align*}
Since $F$ is finite, the defining condition for the cofinite topology gives $U\in\tau_{\mathrm{cof}}$. Therefore $X\setminus F$ is open, so $F$ is closed.
[/step]
[step:Show that every closed set has one of the two listed forms]
Assume that $F$ is closed in $(X,\tau_{\mathrm{cof}})$, and define $U:=X\setminus F$. Since $F$ is closed, $U\in\tau_{\mathrm{cof}}$.
If $U=\varnothing$, then $X\setminus F=\varnothing$, hence $F=X$. If $U\neq\varnothing$, then the definition of $\tau_{\mathrm{cof}}$ implies that $X\setminus U$ is finite. Since
\begin{align*}
X\setminus U=X\setminus (X\setminus F)=F,
\end{align*}
the set $F$ is finite. Therefore every closed subset $F\subset X$ is either $X$ itself or finite.
[guided]
We start from the assumption that $F$ is closed and convert it into a statement about an open set, because the cofinite topology is defined by describing its open sets. Define the subset
\begin{align*}
U:=X\setminus F.
\end{align*}
Since $F$ is closed in $(X,\tau_{\mathrm{cof}})$, the definition of closed set says exactly that its complement $U$ is open, so $U\in\tau_{\mathrm{cof}}$.
Now we use the definition of the cofinite topology. There are two possible ways for $U$ to belong to $\tau_{\mathrm{cof}}$. The first possibility is $U=\varnothing$. In that case,
\begin{align*}
X\setminus F=\varnothing,
\end{align*}
which means every point of $X$ lies in $F$, and therefore $F=X$.
The second possibility is that $U\neq\varnothing$. Since $U\in\tau_{\mathrm{cof}}$ and $U$ is not the empty open set, the defining property of the cofinite topology forces the complement of $U$ in $X$ to be finite. That complement is
\begin{align*}
X\setminus U=X\setminus (X\setminus F)=F.
\end{align*}
Hence $F$ is finite.
Thus a closed subset of a cofinite space has exactly one of the two stated forms: either it is all of $X$, or it is finite.
[/guided]
[/step]