Characterization of ideals of algebra of continuous functions on a compact space. I was reading this PlanetMath page on the connections between the topology on a compact Hausdorff topological space $X$ and the maximal ideals on the algebra of continuous functions $C(X)$ on $X$,
which basically states the following two results:

Lemma. Let $I\subset C(X)$ be an ideal. Either $I=C(X)$,
or there exists $p\in X$ such that $f(p)=0$ for all $f\in I$.
Theorem. An ideal $I\subset C(X)$ is maximal if and only if  there exists $p\in X$ such that $$I=\{f\in C(X):f(p)=0\}.$$

This lead me to the following question:

Question. Does there exist a correspondance between open sets in $X$
and the ideals of $C(X)$ (or a subclass of ideals)?

Clearly,
every set of the form
$$I_U=\{f\in C(X):f(U^c)=0\}$$
where $U\subset X$ is open is an ideal of $C(X)$.
Is the converse true,
i.e.,
if one has an ideal $I\subset C(X)$,
does there exist an open set $U$ such that $I=I_U$?
If one defines
$$K=\bigcap_{f\in I}f^{-1}(0),$$
then it is easy to see that $I$ will be contained in an ideal of the form $I_U$,
where $U$ is the complement of the compact $K$, but must it be equal? Or perhaps $I$ is not necessarily equal to $I_U$, but $I_U$ is the closure of $I$ under the supremum norm $\|\cdot\|_{\infty}$?
 A: What you say is true, though the usual statement is: for a compact Hausdorff space $X$ there is a bijection between compact subsets of $X$ and closed ideals of $C(X)$, and it maps maximal ideals to points in $X$.
You have almost shown this; what remains is to see that the zero set
$$Z(I)=\{x\in X\mid (\forall f\in I)\, f(x)=0\}$$
is closed (which is immediate from continuity) and the ideal 
$$I'=I(Z(I))=\{f\in C(X)\mid (\forall x\in Z(I)) f(x)=0\}$$
is the closure of $I$, and to show that for any compact $K\subseteq X$ the ideal $I(K)$ is closed -- though the latter part is not hard to show.
For the harder direction, pick an arbitrary function $f\in I'$ and find a sequence (or a net) of elements $f_n\in I$ converging pointwise (and hence uniformly, by compactness) to $f$.
For a non-closed ideal counterexample, consider the ideal of functions on $[0,1]$ which are zero in a neighbourhood of $0$. This is clearly an ideal whose zero set is $\{0\}$, but it is not $I(\{0\})$. Also note that compactness of $X$ is essential: consider the ideal of compactly supported continuous functions on ${\bf R}$. For a general Hausdorff space, the spectrum of ideals of $X$ is closely related to the Stone-Čech compactification of $X$.
Thusly we can identify $X$ with the maximal spectrum of $C(X)$; this is akin to the correspondence between radical ideals in coordinate ring and Zariski closed subsets in an affine algebraic variety, where we may identify the variety with the maximal spectrum of its coordinate ring; we can do similar things for smooth functions on a manifold as far as I can recall, in contrast to analytic functions, which are much more rigid.
