Let $\pi$ be a prime element in an integral domain. So, $\pi$ is a non-unit and if $\pi \mid ab \ $ then $\pi \mid a$ or $\pi \mid b$.
An irreducible element $z$ is an element such that if $z=ab$, then $a$ or $b$ is a unit, but not both.
Let $\pi =xy$. So, $\pi \mid xy \implies \pi \mid x$ or $\pi \mid y$.
Assume $\pi \mid x$. We also have $x \mid \pi$. So, $\pi$ and $x$ are associates, which implies $\pi = xu$ where $u$ is a unit.
Thus, $\pi=xy=xu$. So, $y=u$ and therefore $y$ is a unit.
However, what if $\pi$ divides $x$ and divides $y$? Then we would have that both $x$ and $y$ are units which contradicts the definition of irreducible, that $\pi$ is not the product of two units.