I have this definition of primes in my lecture notes and I don't understand it i was wondering whether someone could explain it to me

$p$ is prime if and only if for all $a$, $b$ that are elements of $R$, we have $p \mid ab$ implies $p \mid a$ or $p \mid b$.

See I am rather lost by this definition.