Let $X$ be a compact metric space and $\mathbb{C}(X)$ the algebra of continuous functions $f: X \to \mathbb{C}$, with pointwise operations. We equip $\mathbb{C}(X)$ with the maximum norm $N(f) := \max_{x \in X}|f(x)|$. An ideal $I \subset \mathbb{C}(X)$ is called a closed ideal if $I$ is a closed subset of $\mathbb{C}(X)$ viewed as a metric space. For any subset $Y \subset X$, the set $I_Y := \{f \in \mathbb{C}(X) : f(y) = 0 \text{ for all }y \in Y\}$ is a closed ideal in $\mathbb{C}(X)$.
My question is, what is an example (for some $X$) of a nonclosed ideal in $\mathbb{C}(X)$?
Let $E\subseteq X$. We set $J_E:=\{f\in C(X):\text{$f$ vanishes on a neighbourhood of $E$}\}$. It is easy to see that $J_E$ is an ideal in $C(X)$. Take $E=\{x\}$ for some $x\in X$. Then each function in $I_{\{x\}}$ can be approximated uniformly by functions in $J_{\{x\}}$, but not every function such that $f(x)=0$ is zero on a neighbourhood of $x$. Thus $J_{\{x\}}$ is not closed. (The fact that $J_{\{x\}}$ is dense in $I_{\{x\}}$ is a property called strong regularity.)