Def $1$: Let $(X, \mathcal{T})$ be a topological space, then $D \subseteq X$ is dense if $\overline {D} = X$
Def $2$: $x \in \overline D$ iff for all $U \in \mathcal{T}, x \in U \implies D \cap U \neq \varnothing$
I find myself not being able to connect definition of dense and definition of closure. Thus I don't have a quick way to check whether a set is dense or not.
What is a good procedure for checking whether a set is dense in $X$?
I was thinking that if all $x \in D$ is contained in some open set, then the set is dense, but I do not know to use the definition to prove that is true.
A characterization for a dense set is:
(*) A set $D\subseteq X$ is dense if every non-empty open set $U$ will contain elements of $D$.
If this is the case then it cannot happen that $\overline{D}$ is a proper subset of $X$. This because in that case $U:=X-\overline{D}$ is open, non-empty and contains no elements of $D$. So we conclude that $\overline{D}=X$.
If conversely $\overline{D}=X$ and $U$ is an open set with $x\in U$ then $x\in\overline{D}$ implies that $U\cap D\neq\varnothing$ (as stated in "Def 2" in your answer).
Proved is now that (*) agrees with "Def 1" in your answer.