You seem like you like intuition, so here's some. You are trying to prove something about a ring whose mere definition involves topology. Moreover, it's fairly obvious that this isn't true in general (i.e. you can find topological spaces $X$ for which $\text{MaxSpec}(C(X;\mathbb{R}))\ne{\mathfrak{m}_x:x\in X}$). Thus, you clearly need to use some nontrivial fact about the topology of $[0,1]$. Do any spring naturally to mind? They should, considering precisely what you noticed about the "$f^2+g^2$" problem. Namely, what you can note is that if $f$ doesn't vanish at $x$ on $[0,1]$ and $g$ doesn't vanish at $y$ on $[0,1]$ you can note by continuity that there exists neighborhoods $U,V$ of $x,y$ such that $f,g$ vanish nowhere on either. Aha! But then $f^2+g^2$ vanishes nowhere on $U\cup V$! It seems plausible then that if we assume that we have found an ideal for which there exists no such $c$ (as in the problem) then making an analogous jump we should be able to construct a function $f_x$ for each $x\in[0,1]$ for which $f_x$ doesn't vanish at $x$ and then consider $\displaystyle \sum_{x\in X}f_x^2$ to get a non-vanishing function on $[0,1]$. But, being non-vanishing we have that it's invertible (to a continuous function) and so our ideal contains a unit, and so is all of $C[0,1]$, a contradiction! Of course, this makes no sense since we can't take the infinite
sum of all those squared functions. But, if we were somehow able to pick a finite subcollection which still "works" we'd be golden. Topology sounding a little nicer right about now?
To supplement egreg's answer, here is a proof of the result they mentioned:
If $X$ is a completely regular space, then there is a natural bijection between points of the Stone-Cech compactification $\beta X$ and maximal ideals in $C(X)$.
For $f\in C(X)$, we will write $V(f)$ for $f^{-1}(\{0\})$. Given a point $x\in \beta X$, define $$M_x=\{f\in C(X):x\in\overline{V(f)}\}.$$ (Here and below, the overline denotes closure in $\beta X$, not closure in $X$.) I claim that $x\mapsto M_x$ is our desired bijection.
First, $M_x$ is a maximal ideal. It is clear that it is closed under multiplication by elements of $C(X)$. If $f,g\in M_x$, observe $V(f)\cap V(g)\subseteq V(f+g)$. We will show $x\in\overline{V(f)\cap V(g)}$ and hence $f+g\in M_x$.
So, suppose $x\not\in\overline{V(f)\cap V(g)}$. We can then choose a closed neighborhood $A$ of $x$ which is disjoint from $\overline{V(f)\cap V(g)}$ and a function $h:\beta X\to [0,1]$ which vanishes on $A$ and is $1$ on $\overline{V(f)\cap V(g)}$. Now consider $F=(f^2+h,g^2+h)$ as a function $X\to\mathbb{R}^2$. Observe that $F$ never vanishes, since when $f$ and $g$ both vanish, $h$ is $1$. Choose a continuous function $s:\mathbb{R}^2\setminus\{(0,0)\}\to [0,1]$ such that $s(a,0)=0$ for all $a$ and $s(0,b)=1$ for all $b$. Then $s\circ F$ extends continuously to a map $k:\beta X\to [0,1]$. Observe that $k=1$ on $V(f)\cap A$ and $k=0$ on $V(g)\cap A$. But $A$ is a neighborhood of $x$, so $x\in\overline{V(f)\cap A}$ and also $x\in\overline{V(g)\cap A}$. Thus by continuity, $k(x)=1$ and $k(x)=0$, which is a contradiction.
We have therefore shown that $M_x$ is an ideal. For maximality, suppose $f\in C(X)\setminus M_x$. Then $x\not\in\overline{V(f)}$, so as above we can choose $h:\beta X\to [0,1]$ which vanishes on a neighborhood of $x$ and is $1$ on $\overline{V(f)}$. Then $h|_X\in M_x$ since it vanishes on an entire neighborhood of $x$, and $h|_X+f^2$ vanishes nowhere on $X$. Thus $h|_X+f^2$ is a unit in $C(X)$ and thus the ideal generated by $M_x$ and $f$ is not proper. Since $f\not\in M_x$ was arbitrary, this shows $M_x$ is maximal.
Now I claim that for $x\neq y$, $M_x\neq M_y$. To prove this, choose $h:\beta X\to [0,1]$ vanishing on a closed neighborhood of $x$ but not vanishing at $y$. Then $h|_X\in M_x$ and $h|_X\not\in M_y$.
Finally, I claim that any maximal ideal $M\subset C(X)$ is equal to $M_x$ for some $x\in \beta X$. To prove this, let $Z=\{\overline{V(f)}:f\in M\}$. Note that $V(f)$ is nonempty for all $f\in M$ since $M$ cannot contain a unit, and also that $V(f)\cap V(g)\supseteq V(f^2+g^2)$. It follows that $Z$ has the finite intersection property, and so by compactness of $\beta X$ there is some $x\in \beta X$ which is in every element of $Z$. But this just means that $M\subseteq M_x$, and so by maximality of $M$, $M=M_x$.
As for prime ideals that are not maximal, there are a lot more possibilities and it is much harder to describe all of them. As mentioned in Max's answer, you can construct some using ultrafilters. In fact, instead of considering functions which are $0$ along an ultrafilter as he does, you can instead consider functions which converge to $0$ at a certain rate, and in this way you can obtain large nested collections of prime ideals. You can find the details of such a construction at this answer of mine, which constructs a chain of prime ideals in $C(X)$ which is order-isomorphic to $[0,\infty)$ from any element of $C(X)$ that is not locally constant.
Best Answer
Whoever told you that was mistaken; there is no way to prove this without using some special property of $[0,1]$ that is closely related to compactness. To try to convince you of this, let me point out that the result is not true if you replace $[0,1]$ by $(0,1]$. Indeed, if $R$ is the ring of continuous functions $(0,1]\to\mathbb{R}$, let $I\subset R$ be the set of functions which are identically $0$ on $(0,\epsilon)$ for some $\epsilon>0$. Then $I$ is an ideal: if $f,g\in I$ with $f$ vanishing on $(0,\epsilon)$ and $g$ vanishing on $(0,\epsilon')$, then $f+g$ vanishes on $(0,\min(\epsilon, \epsilon'))$. And if $f\in I$ and $g\in R$, then $gf$ vanishes everywhere that $f$ does, so $gf\in I$.
Since the constant function $1$ is not in $I$, $I$ is a proper ideal in $R$, so there is some maximal ideal $M$ containing it. But for any $c\in (0,1]$, $M\neq M_c$, since we can take $\epsilon=c/2$ and find a continuous function $f$ which vanishes on $(0,\epsilon)$ but such that $f(c)\neq 0$, and then $f\in M$ but $f\not\in M_c$.
More generally, a similar counterexample can be given for any reasonably nice non-compact space. To be precise, let $X$ be any completely regular space that is not compact and let $R$ be the ring of continuous functions $X\to\mathbb{R}$. Then there exists a maximal ideal in $R$ which is not $M_c=\{f\in R:f(c)=0\}$ for any $c\in X$. (Proof sketch: pick a point $x\in \beta X\setminus X$, let $I$ be the ideal of functions which vanish in a neighborhood of $x$, and let $M$ be any maximal ideal containing $I$.)