Let $p\in\mathbb R^n$ and $\|\cdot \|$ the Euclidian norm. Show that if $K\subset \mathbb R^n$ is a close set, then $$\exists a\in K: \forall x\in K, \|a-p\|\leq \|x-p\|.$$
Since $\|x-p\|\geq 0$, there is a $m\geq 0$ such that $$m=\inf_{x\in K}\|x-p\|.$$
Now, I have to show that there is a $a\in K$ such that $m=\|a-p\|$. My idea is to take a sequence $(x_n)_{n\in\mathbb N}\subset K$ such that $\lim_{n\to \infty }\|x_n-p\|=m$. My problem is to show that $(x_n)_{n\in\mathbb N}$ converge or that $(x_n)$ has a subsequence that converge.
The problem of finding a convergent subsequence in was solved in comments. For completeness, here is a more general result which is not any harder to prove:
(A function is called proper if the preimage of every compact set is compact.)
Proof: suppose $E$ is closed; let $m=\inf_E f$. Since the set $E\cap f^{-1}([m,m+1])$ is compact and nonempty, $f$ attains the value $m$.
Application to your problem: the function $f(x)=\|x-p\|$ is proper, continuous, and bounded below by $0$.