Let R be commutative ring with the identity 1\neq 0. The ideal P is a prime ideal in R ring iff R/P is an integral domain.
Proof. It is important to use the definition of a prime ideal in this proof.
“\Rightarrow“: Assume that P is a prime ideal of R. Then P \neq R and when ab \in P, then either a \in P or b \in P. Take the quotient ring of R by P, that is, R/P. Since P is a prime ideal, we know firstly that R/P \neq \overline{0}.
Let \overline{r} = r + P \in R/P. Then \overline{r} = 0 in R/P if and only if r \in P. Now take the elements \overline{a} = a + P and \overline{b} = b + P in R/P. Take by assumption that \overline{a}\overline{b} = 0. Then either \overline{a} = \overline{0} or \overline{b} = \overline{0} by the definition of a prime ideal. This means that R/P has no zero divisors, and we saw earlier that R/P \neq \overline{0}, which is the definition of an integral domain.
“\Leftarrow“: repeat the proof above in the opposite direction.