I am trying to understand this proof of why a compact space $M$ contains a countable subset $C$ such that the closure of $C$ = $M$.
For every $n \in \mathbf{N}$, $\{B_{\frac{1}{n}}(p) \mid p \in M\}$ is an open covering of $M$. Since $M$ is covering compact any open cover contains a finite subcover, so for each $n \in \mathbf{N}$ there are a finite set of points $\left\{p_{n,1}, p_{n,2}, \ldots, p_{n, m_{n}}\right\}$ such that $M \subseteq \cup_{k=1}^{m_{n}}B_{\frac{1}{n}}(p_{n,k})$. Let $C = \cup_{n=1}^{\infty}\left\{p_{n,1}, p_{n,2}, \ldots, p_{n, m_{n}}\right\}$. As a countable union of finite sets we have that $C$ is countable. Now let $p \in M$ and $\epsilon > 0$, and let $n \in \mathbf{N}$ such that $n > \frac{1}{\epsilon}$. Since $M \subseteq \cup_{k=1}^{m_{n}}B_{\frac{1}{n}}(p_{n,k})$, there exists a $k$ in $1 \leq k \leq m_{n}$ such that $p \in B_{\frac{1}{n}}(p_{n,k})$. Thus $$d(p_{n,k}, p) < \frac{1}{n} < \epsilon$$ and so $p_{n,k} \in B_{\epsilon}(p)$ which shows that $C \cap B_{\epsilon}(p) \neq \emptyset$.
Why does the fact that $C \cap B_{\epsilon}(p) \neq \emptyset$ for all $p \in M$, $\epsilon > 0$ means that the closure of $C$ = M?
Let $p$ be any point of $M$. If $U$ is an open nbhd of $p$, there is some $\epsilon>0$ such that $B_\epsilon(p)\subseteq U$. But then $U\cap C\supseteq B_\epsilon(p)\cap C\ne\varnothing$. Thus, every open nbhd of $p$ meets $C$, so $p$ is a limit point of $C$, and therefore $p\in\operatorname{cl}C$. Since $p$ was arbitrary, this means that $M\subseteq\operatorname{cl}C$, and since we certainly have $\operatorname{cl}C\subseteq M$, it must be the case that $\operatorname{cl}C=M$.