If a prime divides a product then it must divide a factor of the product [Euclid's Lemma]

A basic consequence of the existence and uniqueness of prime factorizations is Euclid's Lemma: if a prime $p$ divides a product then it must divide some factor. Indeed if $\, pc = ab\,$ then appending the unique prime factorizations of $a$ and $b$ necessarily yields the unique prime factorization of $ab$. By uniqueness this is the same as the factorization of $pc$ obtained similarly, where $p$ occurs, so $p$ must also occur in the prime factorization of $a$ or $b$, i.e. $\,p\mid a\,$ or $\,p\mid b.\,$ Notice the crucial role played here by uniqueness (which actually occurs more times than I mentioned explicitly). See here for a proof using gcds, and further remarks.

Conversely if $p$ isn't prime then $\,p = ab,\ a,b>1$ so $\,p\mid ab\,$ but $\,p\nmid a\, $ (else $\,p\!=\!ab\mid a\,\Rightarrow\,b\mid 1)\,$ and similarly $\,p\nmid b,\,$ so the above fundamental "prime divisor property" fails for composites, hence Euclid's Lemma characterizes primes (among nonzero nonuinit integers). In fact Euclid's Lemma is used as the definition of a prime in more general rings (where it is generally distinct from the property of being irreducible, i.e. having only trvial splittings where one factor is a unit).