Is there any non-compact space $X$ such that every maximal ideal of $ C(X, \mathbb R)$ is of the form $\{f \in C(X, \mathbb R) : f(a)=0 \}$? Does there exist a non-compact metric space $X$ , such that for every maximal ideal $M$ of $\mathcal C(X, \mathbb R)$ , 
$\exists a \in X$ such that $M:=\{f \in \mathcal C(X, \mathbb R) : f(a)=0 \}$ ?
Does there exist any such non-compact topological space $X$ ?
 A: For metric spaces, the answer is "No".
Let $X$ be a topological space. For $f \in C(X)$ - we omit the codomain $\mathbb{R}$ in the notation for brevity - we denote the zero set of $f$ by $Z(f)$:
$$Z(f) := \{ x \in X : f(x) = 0\},$$
and the family of zero sets of continuous functions by $Z(X)$,
$$Z(X) := \{ V \subset X : (\exists f \in C(X))(V = Z(f))\}.$$
A $Z$-filter on $X$ is a family $\mathscr{Z}\subset Z(X) \setminus \{\varnothing\}$ such that


*

*$X \in \mathscr{Z}$,

*$Z_1,Z_2 \in \mathscr{Z} \implies Z_1 \cap Z_2 \in \mathscr{Z}$,

*$Z\in \mathscr{Z}, V\in Z(X), Z \subset V \implies V \in \mathscr{Z}$.


Given a proper ideal $\mathscr{I} \subsetneq C(X)$, the family
$$Z(\mathscr{I}) = \{ Z(f) : f \in \mathscr{I}\}$$
is a $Z$-filter on $X$. Since $\mathscr{I}$ is a proper ideal $\varnothing \notin Z(\mathscr{I})$ - a function that vanishes nowhere is a unit in $C(X)$. The relations $Z(0) = X$, $Z(f) \cap Z(g) = Z(f^2 + g^2)$ and $Z(f) \subset Z(g) \implies Z(fg) = Z(g)$ show that $Z(\mathscr{I})$ is indeed a $Z$-filter.
Conversely, given a $Z$-filter $\mathscr{Z}$ on $X$, the set
$$I(\mathscr{Z}) := \{ f \in C(X) : Z(f) \in \mathscr{Z}\}$$
is a proper ideal of $C(X)$. Since $Z(1) = \varnothing$, $I(\mathscr{Z})$ is proper, $Z(0) = X \in \mathscr{Z}$, $Z(f) \cap Z(g) \subset Z(f+g)$ and $Z(fg) = Z(f)\cup Z(g)$ show $I(\mathscr{Z})$ is an ideal.
We have the easily verified relations $\mathscr{I} \subset I(Z(\mathscr{I}))$, $Z(I(\mathscr{Z})) = \mathscr{Z}$, $\mathscr{I}\subset \mathscr{J} \implies Z(\mathscr{I}) \subset Z(\mathscr{J})$, and $\mathscr{V}\subset \mathscr{Z} \iff I(\mathscr{V}) \subset I(\mathscr{Z})$.
A maximal (with respect to inclusion) $Z$-filter is called a $Z$-ultrafilter.
The above relations show that we have a bijective correspondence between $Z$-ultrafilters on $X$ and maximal ideals of $C(X)$.
A $Z$-filter $\mathscr{Z}$ on $X$ is called free if
$$\bigcap \mathscr{Z} = \bigcap_{Z\in \mathscr{Z}} Z = \varnothing.$$
Lemma: There is a bijection between the set of non-free $Z$-ultrafilters on $X$ and the set of maximal ideals of the form $\mathfrak{M}(a) = \{ f \in C(X) : f(a) = 0\}$ of $C(X)$.
Proof: Evidently
$$a \in \bigcap Z(\mathfrak{M}(a)),$$
so $Z(\mathfrak{M}(a))$ is a non-free $Z$-filter on $X$, and by maximality of $\mathfrak{M}(a)$, it is a $Z$-ultrafilter. Conversely, if $\mathscr{U}$ is a non-free $Z$-ultrafilter on $X$, we have $I(\mathscr{U}) \subset \mathfrak{M}(p)$ for all $p \in \bigcap \mathscr{U}$, and by maximality of $I(\mathscr{U})$ it follows that in fact we have the equality $I(\mathscr{U}) = \mathfrak{M}(p)$ for all $p \in \bigcap \mathscr{U}$.
Now we have the
Proposition: Let $X$ be a topological space such that all closed subsets of $X$ are $Z$-sets. If all maximal ideals of $C(X)$ have the form $\mathfrak{M}(a)$ for some $a\in X$, then $X$ is quasicompact.
Proof: By the lemma above, the condition that all maximal ideals are of the form $\mathfrak{M}(a)$ implies that there are no free $Z$-ultrafilters, and since every $Z$-filter is contained in a $Z$-ultrafilter, there are no free $Z$-filters on $X$. Now let $\mathscr{F}$ be an arbitrary filter on $X$. Then
$$\overline{\mathscr{F}} := \{ \overline{F} : F \in \mathscr{F}\} = \{ F \in \mathscr{F} : F = \overline{F}\}$$
is a $Z$-filter on $X$, since all closed sets are $Z$-sets by assumption. Since $Z$-filters on $X$ are non-free,
$$\varnothing \neq\bigcap \overline{\mathscr{F}} = \bigcap_{F \in \mathscr{F}} \overline{F},$$
so $\mathscr{F}$ has an adherent point. It follows directly from the definitions that a space is quasicompact if and only if every filter has an adherent point.
In metric spaces, every closed set is the zero set of a continuous function, so a metric space $X$ is compact if and only if every maximal ideal of $C(X)$ is of the form $\mathfrak{M}(a)$.
For non-metrisable spaces - we can still restrict our attention to Hausdorff spaces, since with the equivalence relation $a \sim b \iff (\forall f \in C(X))(f(a) =  f(b))$, the space $\tilde{X} = X/{\sim}$ is Hausdorff, $C(X) \cong C(\tilde{X})$, and we have the correspondence between $\mathfrak{M}(a)$ and $\mathfrak{M}([a]_{{\sim}})$ under the canonical isomorphism between $C(X)$ and $C(\tilde{X})$ - I suspect that there are non-compact spaces where all $Z$-filters are non-free, but so far, I can't think of an example.
A: This is just a comment ,not an "exact" answer of the question. 
The following result is basically Theorem 2.1 in C∞-differentiable spaces by Juan A. Navarro González and Juan B. Sancho de Salas:
Theorem: For any manifold $M$ ,the maximal ideals of $C(M)$ whose residue field is $\mathbb R$ is exactly in bijection with the points of $M$.
A: Ideals of the type you describe are called fixed maximal ideals. Any other
maximal ideal is called free. 
A necessary and sufficient condition for $C(X)$ to have no free maximal ideals is that the initial topology of $C(X)$ is compact. 
In spaces where $C(X)$ separates points from closed sets, such
as metric spaces, the initial topology of $C(X)$ is exactly the given
topology of $X$, so as far as metric spaces are concerned, compactness is necessary.
A rather trivial way of finding a non-compact $X$ for which the initial topology of $C(X)$ is compact is to look for non-compact spaces on
which all continuous functions are constant. Perhaps the simplest
example is an uncountable set with the cocountable topology. Such spaces
are not countably compact because a countable subset has no limit points.
There can be no non-constant continuous map into any Hausdorff space since
any two nonempty open sets have a nonempty intersection, hence the initial
topology of $C(X)$ is trivial.
A possibly more satisfying class of examples can be found by taking a compact Hausdorff space $Y$ and letting $X$ be the same set of points
with a strictly finer topology, in such a way that $C(X) = C(Y)$.
It is then automatic that $X$ is Hausdorff, but not compact, since the
canonical bijection $X \to Y$ is continuous, but not closed.
For instance, let $Y = [0, 1]$ with the order topology, and let $X$
have the smallest extension of that topology in which
$S = \{ 1/n \mid n \in \mathbb{N} \}$ is closed. Obviously $C(Y) \subset C(X)$. Observe also that $Y\setminus\{0\}$ carries the same topology as
$X\setminus\{0\}$ and the same goes for $Y\setminus S$ and $X\setminus S$.
For any $f \in C(X)$, it is then clear that the restrictions of $f$ 
to these subspaces of $Y$ are continuous. Because $\mathbb{R}$ is regular,
$Y$ is T1 and $Y \setminus S$ is dense in $Y$, we only need to establish
that the restriction of $f$ to $(Y\setminus S) \cup \{p\}$ is continuous for every $p \in S$. That this is true can be seen from the fact that
$(Y\setminus S)$ and $(Y\setminus\{0\}\setminus S) \cup \{p\}$ form an open cover and $f$ is
continuous on each of them. Hence $C(X) = C(Y)$, so they have the
same maximal ideals, all fixed.
