I was studying Yves Lequain's elements of algebra and this was a question on the second chapter of the book. I have been able to prove two implications but it remains to prove $(i)\Rightarrow (ii)$:
Let $D$ be a principal domain. Prove the following statements are equivalent about an ideal $I$:
$(i)$ $I$ is maximal;
$(ii)$ $I$ is prime;
$(iii)$ $I=(p)$ where $p$ is irreducible
$(iii)\Rightarrow (i)$ Suppouse we have a strict inclusion $(p)\subset I'$. If we take $i\in I' \setminus (p)$ and $d|i$ and $d|p$ we must have an invertible $d$. If $d$ weren't invertible, we would have $p=du$ where $u$ is invertible and $dq=i$. Therefore, $u^{-1} q p=i$ and $i \in (p)$, which is absurd. Therefore, $gcd(i,p)=1$ (or any unit) and:
$$(p)+(i)=(1)=D\subset I' \Rightarrow D=I'$$
This means $I$ is maximal.
$(i)\Rightarrow (ii)$ I haven't been able to prove this direction. However this seems to be a well known result as discussed here, as was pointed in the comment section. Thank you @Anne and @pmp.
$(ii\Rightarrow iii)$ Becuase we have a principal domain, there is a certain $p$ such that $I=(p)$. $p$ cannot be invertible because if it were $I=D$, but prime ideals are not the entire domain by definition.If $p=ab$, we must have $a\in I$ or $b\in I$ therefore $pq=a$ or $p\tilde{q}=b$. Without loss of generality let us take $p q=a$. Then $p=ab=pqb\Rightarrow p(1-qb)=0$ and because $p\not=0$, $1=qb$. Therefore $b$ is invertible (or $a$) and $p$ is irreducible.