It is clear that $(a,b) \subset \overline{(a,b)}$, so we only need to show that
$a,b \in \overline{(a,b)}$. For every sufficiently small $\varepsilon>0$ (say $\varepsilon<b-a$) we have
$$
(a-\varepsilon,a+\varepsilon)\cap(a,b)=(a, a+\varepsilon)\ne \varnothing,
$$
i.e. $a \in \overline{(a,b)}$. Similarly we have
$$
(b-\varepsilon,b+\varepsilon)\cap(a,b)=(b-\varepsilon,b)\ne \varnothing,
$$
i.e. $b \in \overline{(a,b)}$.
In the same manner we have
$$
A:=\left\{\frac{1}{n}:\ n \in \mathbb{N}\right\} \subset \overline{A}=\overline{\left\{\frac{1}{n}:\ n \in \mathbb{N}\right\}},
$$
and only need to show that $0 \in \overline{A}$.
Since $\lim_{n\to \infty}\frac{1}{n}=0$, for every $\varepsilon>0$ there exists some integer $N=N(\varepsilon) \ge 1$ such that
$$
\left|\frac{1}{n}\right| < \varepsilon \quad \forall n \ge N,
$$
i.e.
$$
(-\varepsilon,\varepsilon)\cap A =\left\{\frac{1}{n}:\ n \ge N\right\} \ne \varnothing,
$$
and we conclude that $0 \in \overline{A}$.