If $R$ is commutative with $1 \in R$, then each maximal ideal of $R$ is also a prime.
The reverse doesn't hold.
For example, $R=K[x, y], P=\langle x \rangle, M=\langle x, y\rangle$.
Then it stands $$P=\langle x \rangle \subsetneq M=\langle x, y\rangle \subsetneq K[x, y]$$ $M$ is maximal, so also prime, but $P$ is prime but not maximal.
Can you explain how we know that $M$ is maximal and that $P$ is prime but not maximal?
$$$$
Edit:
To show that $P$ is prime do we do the following?
We consider the homomorphism $\phi: K[x, y] \rightarrow K[y]$ with $\phi(z)=z, \forall z \in K[y]$ and $\phi(x)=0$.
We consider a polynomial $p(x, y) \in K[x, y]$.
Applying the euclidean division of the polynomial and $x$, we get:
$$p(x,y)=x \cdot g(x, y)+r(x, y)$$
$$deg_x r(x, y)<deg(x)=1 \Rightarrow deg_x r(x, y)=0 \Rightarrow r(x, y)=r(y)$$
So $p(x, y)=x \cdot g(x, y)+r(y)$.
Let $p(x, y \in ker \phi$. Then $\phi ( p(x, y))=0 \Rightarrow r(y)=0$.
So, $p(x, y)=x \cdot g(x, y)$.
So, if $p(x, y) \in ker \phi$, then $p(x, y) \in \langle x \rangle$.
So, $ker \phi \subseteq \langle x \rangle$.
$x \in \langle x \rangle$
$\phi (x)=0$
So $x \in ker \phi$.
So, $\langle x \rangle \subseteq ker \phi$.
Therefore, $ker \phi =\langle x \rangle$.
We have that $Im \phi \subseteq K[y]$.
For each $z \in K[y]$, there is an element of $K[x, y]$ that gets mapped with $\phi$ to $z$.
So $K[y] \subseteq Im \phi$.
Therefore, $Im \phi =K$.
From the theorem of isomorphism we have that $$K[x, y] /\langle x \rangle \cong K[y]$$
$K[y]$ is an integral domain, so $K[x, y] /\langle x \rangle$ is an integral domain.
Therefore, $P=\langle x \rangle$ is a prime Ideal of $K[x, y]$.
$$$$
Can you check what I've tried?
Why is $K[y]$ an integral domain? Do we have to prove it?
A way to see this is that $K[x,y]/M \cong K$ is a field, while $K[x,y]/P \cong K[y]$ is not a field but an integral domain.
This assumes you know the criterion or definition that $I$ is a maximal ideal of $R$ if and only of $R/I$ is a field, and that $I$ is a prime ideal of $R$ if and only of $R/I$ is an integral domain.