Here is an argument proving that every maximal ideal in $C_0(X)$ is closed. This applies to both the real and complex cases. The argument is adapted from Proposition 3.1 in this paper by Dales.
Let $A = C_0(X)$, $I \subset A$ be a maximal ideal. Clearly, $I$ is either closed or dense, so we may assume to the contrary that it is dense. It is standard exercise to show that maximal ideals in unital Banach algebras (real or complex) are closed, so $X$ is non-compact. Let $\tilde{A} = C(X \cup \{\infty\})$ be the unitization of $A$. Note that any ideal in $A$ is also an ideal in $\tilde{A}$. Pick $a \in A \setminus I$. Every element of $C_0(X)$ can be written as the product of two elements, so we may write $a = bc$ for some $b, c \in A$.
Now, let $J = a\tilde{A} + I$. Since $J$ is an ideal that contains $I$ and also $a \in A \setminus I$, by maximality of $I$, $J = A$. Thus, in particular $b - ad \in I$ for some $d \in \tilde{A}$. On the other hand, $I$ is dense in $A$, so we may pick $e \in A$ with $\|e\| < \frac{1}{\|d\|}$ s.t. $c - e \in I$. Thus, $a - be = bc - be \in I$, so,
$$b(1 - ed) = b - bed \in I$$
as $b - ad \in I$ and $a - be \in I$. But $\|ed\| \leq \|e\|\|d\| < 1$, so $1 - ed$ is invertible in $\tilde{A}$. But then,
$$a = bc = cb(1 - ed)(1 - ed)^{-1} \in I$$
as $b(1 - ed) \in I$. This contradicts our assumption that $a \in A \setminus I$, so $I$ cannot be dense. $\square$
Once we know that maximal ideals are closed, the remainder is actually easier in the real case than in the complex case. Indeed, now just apply Stone-Weierstrass to see that, if an ideal $I \subset C_0(X)$ vanished nowhere, then it must be dense. Thus, a maximal ideal must vanish at some point $p \in X$. So $I \subset \{f \in C_0(X): f(p) = 0\}$. The latter set is a proper ideal, whence $I$ must equal the latter set. (In the complex case, this is harder, as one needs to show maximal ideals are also self-adjoint before being able to apply Stone-Weierstrass.)