Here are some examples, for the case $M=\mathbb{R}$.

For each $n\geq 0$ we have a closed ideal $$I_n=\{f: f^{(i)}(0)=0 \text{ for } 0\leq i < n\}$$ We can write $I_\infty$ for the intersection of these, which is again closed. We can also put $$J = \{ f : f(x)=0 \text{ for all } x \leq 0\}$$ and note that this is closed and contained in $I_\infty$.

Next, for $n,a>0$ with $n\in\mathbb{Z}$ we can let $K_{n,a}$ be the principal ideal generated by the function $\exp(-a/x^{2n})$. These are all different and contained in $I_\infty$. I am not sure whether they are closed.

For another kind of example, let $\mathcal{U}$ be a free ultrafilter on $\mathbb{R}$ and put $$L = \{f : f^{-1}\{0\} \in \mathcal{U} \}.$$ This is a non-closed maximal ideal.

UPDATE:

Now let $A$ be an arbitrary closed ideal in $C^\infty(\mathbb{R})$. Put $$X_n = \{ x\in\mathbb{R} : f^{(i)}(x)=0 \text{ for all } i \leq n \text{ and } f\in A\}.$$ Specialising Reimundo's answer to the case $M=\mathbb{R}$, we see that $$A = \{ f : f^{(i)}=0 \text{ on } X_n \text{ for all } i\leq n \}.$$ The sets $X_n$ are closed, with $X_n\supseteq X_{n+1}$. Moreover, if $x$ is a non-isolated point of $X_n$ (so it is in the closure of $X_n\setminus\{x\}$) then it is easy to see that $x\in X_{n+1}$. I would guess that the closed ideals biject with chains of subsets with these properties, but I have not tried to prove that.

1

Here are some examples, for the case $M=\mathbb{R}$.

For each $n\geq 0$ we have a closed ideal $$I_n=\{f: f^{(i)}(0)=0 \text{ for } 0\leq i < n\}$$ We can write $I_\infty$ for the intersection of these, which is again closed. We can also put $$J = \{ f : f(x)=0 \text{ for all } x \leq 0\}$$ and note that this is closed and contained in $I_\infty$.

Next, for $n,a>0$ with $n\in\mathbb{Z}$ we can let $K_{n,a}$ be the principal ideal generated by the function $\exp(-a/x^{2n})$. These are all different and contained in $I_\infty$. I am not sure whether they are closed.

For another kind of example, let $\mathcal{U}$ be a free ultrafilter on $\mathbb{R}$ and put $$L = \{f : f^{-1}\{0\} \in \mathcal{U} \}.$$ This is a non-closed maximal ideal.