Show that if a set is compact then it is closed.
definitions: Let $A\subset \mathbb{R}$. A point $p\in\mathbb{R}$ is an accumulation point or limit point of $A$ if and only if every open set $G$ containing $p$ contains a point of $A$ different from $p$. A subset $A$ of $\mathbb{R}$ is closed if and only if $A$ contains each of its points of accumulation.
proof: Suppose $A\subset \mathbb{R}$ is compact and $A\subset \bigcup O_\alpha$ where $O_\alpha$ is open. Since, $A\subset \bigcup O_\alpha$ there exists $\alpha_1,\dots,\alpha_n$ such that $$A\subset O_{\alpha_{1}}\cup O_{\alpha_{2}}\cup \ldots \cup O_{\alpha_{n}}$$ Now suppose we have a point $p\in\mathbb{R}$. Let $G = \bigcup_{i=1}^{n}O_{\alpha_{i}}$, and $p\subset G$. Then $p$ is an accumulation point of $A$ since every open set $G$ contains $p$ can also contain a point of $A$ different from $p$.
I am not sure if this is the right approach but it makes sense to me, I just don't know how to go on from here. Any suggestions would be greatly appreciated.