$\textbf{Theorem}$: If $R$ is a principal ideal domain, then $p$ is prime $\iff$ $p$ is irreducible.
$Proof:$ $(\Longleftarrow)$ If $p$ is irreducible, then $(p)$ is maximal in the set of all proper principal ideals of $R$. Since $R$ is an integral domain, $(p)$ is prime. Then, $p$ is prime.
However, it seems that I did not use PID, could anyone help me check what's my problem, thanks in advance.
$\textbf{Edit:}$ In an integral domain $R$, $c$ is irreducible $\iff$ $(c)$ is maximal in the set $S$ of all proper principal ideals of $R$.
$Proof$:$(\Longrightarrow)$ If $c$ is irreducible, then $(c)$ is a proper ideal in $R$. If $(c) \subset (d)$, then $c=dx, x \in R$. $(Case1):$ If $d$ is a unit, then $(d)=R$. $(Case2):$ If $x$ is a unit, then $c$ and $d$ are associates. which means $(a)=(b)$.
$(\Longleftarrow):$ If $(c)$ is maximal in the set $S$ of all proper principal ideals, then $c$ is a nonzero nonunit in $R$.If $c=ab$, then $(c)\subset (a) \implies (c)=(a)$ or $(a)=R$. $(Case1):$ If $(a)=R$, then $a$ is a unit. $(Case2):$ If $(c)=(a)$, then $a=cr_1, r_1 \in R.$ $c(r_1b-1_R)=0 \implies r_1 b=1_R$, $i.e.$ $b$ is a unit in $R$