In affine algebraic geometry, prime ideals in a ring $R$ correspond to irreducible subschemes of $Spec(R)$. For a real, compact, smooth manifold $M$, each prime ideal in $\mathcal{C}^\infty(M)$ is contained in a unique maximal ideal (corresponding to a single point), so we can’t use prime ideals to understand submanifolds.
But what if we restrict to the ring $\mathcal{C}^{an}(M)$ of real, analytic functions on $M$? I understand that the zero sets of analytic functions are unions of submanifolds of lower dimension, so it seems like we’re on the right track. But can it be shown (or proven false) that for all prime ideals $P$, the zero set $Z(P)$ is a closed, irreducible submanifold of $M$, and that for any closed, irreducible submanifold $N$ in $M$, $I(N)$ (the set of analytic functions vanishing on $N$) is prime in $\mathcal{C}^{an}(M)$?
Note that I use “irreducible” to mean “unable to written as a finite union of closed submanifolds”, not just closed subsets.
Whitney's umbrella provides a counterexample to your first statement. Let $M=\Bbb R^3$ and $P=(x^2-y^2z)$; then the zero set is not even pure-dimensional. $P$ is prime for the following reason: $\Bbb R^2$ maps to the Whitney umbrella by $\varphi:(u,v)\mapsto (uv,u,v^2)$ with real-analytically dense image. So if $fg\in P$, then pulling back we have that $\varphi^*(fg)=(\varphi^*f)(\varphi^*(g))$ is a function on $\Bbb R^2$ which is zero and real analytic functions on $\Bbb R^2$ are a domain. Thus one of $f$ and $g$ is already zero on the Whitney umbrella, and $P$ is prime.
The second statement is true. Suppose $f,g\in C^{an}(M)$ with $fg\in I(N)$. Then $N=V(f)\cup V(g)$ is a decomposition in to closed analytic subsets, and by irreducibility we have that one of $V(f)$ and $V(g)$ is all of $N$, so one of $f$ and $g$ is in $I(N)$.