By the definition
$$\partial A=\overline{A}\cap\overline{X\backslash A}$$
Take $X=\mathbb{R}$ and $E=[0,1]\cap\mathbb{Q}$. Then $\overline{E}=[0,1]$ since $\mathbb{Q}$ is dense. Also $\mathbb{R}\backslash\mathbb{Q}$ is dense so $\overline{\mathbb{R}\backslash E}=\mathbb{R}$. Therefore $\partial E=[0,1]$. Moreover $\partial(\partial E)=\{0, 1\}$.
Lemma. $\partial(\partial E)=\partial E$ if and only if $\partial E$ has empty interior.
Proof.
"$\Leftarrow$" Since $\partial E$ is closed, then $\overline{\partial E}=\partial E$. Since $\partial E$ has empty interior then the complement is dense $\overline{X\backslash \partial E}=X$. Thus
$$\partial(\partial E)=\overline{\partial E}\cap\overline{X\backslash \partial E}=\partial E\cap X=\partial E$$
"$\Rightarrow$" Assume that $\partial E$ has a nonempty interior and take $x$ from the interior. Note that $x\not\in\overline{X\backslash\partial E}$ because if $U\subseteq\partial E$ is such that $x\in U$ and open, then $X\backslash\partial E\subseteq X\backslash U$ and thus $\overline{X\backslash\partial E}\subseteq X\backslash U$ because the set on the right side is closed.
Since $x\not\in \overline{X\backslash\partial E}$ then obviously $x\not\in\partial(\partial E)$ which contradicts the assumption. $\Box$
So for example this always holds in case when $E$ is closed or open.