Adam, the requirement that $p$ be unramified in the number field is to explain the existence of an element (really, conjugacy class) in the Galois group with a certain cycle structure on the roots of a generator for the number field. The way this element of the Galois group is constructed requires algebraic number theory, but it can be translated into a more elementary-sounding proposition about factoring a polynomial mod $p$ at the expense of giving up on being able to apply the result to a few primes for which the method really does work at a more technical level.

If $K = {\mathbf Q}(\alpha)$ and $\alpha$ is an algebraic integer with minimal polynomial $f(x)$ in ${\mathbf Z}[x]$, the elementary proposition is that if $p$ is a prime number such that $f(x) \bmod p$ is a product of distinct irreducibles with degrees $d_1,\dots,d_r$ then there's an element of the Galois group of the Galois closure of $K/{\mathbf Q}$ whose cycle structure on $\alpha$ and its ${\mathbf Q}$-conjugates consists of disjoint cycles of length $d_1,\dots,d_r$.

The more advanced proposition, which makes no reference to polynomials mod $p$, is that if $p$ is a prime number unramified in $K$, so
necessarily $p{\mathcal O}_K = {\mathfrak p}_1\cdots {\mathfrak p}_r$ for some distinct primes ${\mathfrak p}_i$ with residue field degrees $d_i$, then there is an element of the Galois group of the Galois closure of $K/{\mathbf Q}$ whose permutation action on $\alpha$ and its ${\mathbf Q}$-conjugates is a product of disjoint cycles with lengths $d_i$.

The link between the elementary and advanced propositions is: $\text{disc}(f) = [{\mathcal O}_K:{\mathbf Z}[\alpha]]\text{disc}(K)$. This equation implies that if $f(x) \bmod p$ has distinct irreducible factors then $p$ doesn't divide $\text{disc}(f)$ and therefore also doesn't divide the discriminant of $K$, so $p$ is unramified in $K$. Moreover, $p$ doesn't divide that ring index, which implies that the shape of the factorization of $p{\mathcal O}_K$ matches the shape of the factorization of $f(x) \bmod p$. So under the condition that $f(x) \bmod p$ has distinct irreducible factors the elementary and advanced propositions are both applicable (their hypotheses are both satisfied) and lead to the same conclusion: both propositions imply the existence of an element of the Galois group with the same cycle structure as a permutation of the ${\mathbf Q}$-conjugates of $\alpha$. Primes at which the elementary proposition hold are always primes at which the advanced proposition holds, but not conversely: there can be primes $p$ which are unramified in $K$ (that is, $p$ doesn't divide $\text{disc}(K)$) but the reduced polynomial $f(x) \bmod p$ has multiple irreducible factors (that is, $p$ divides $\text{disc}(f)$), so the advanced proposition can be applied to this prime $p$ but the elementary one can not.

Incidentally, for a ramified prime $p$ in $K$ with ramification indices $e_1,\dots,e_r$ and respective residue field degrees $d_1,\dots,d_r$, it's natural to ask if there might be an element of the Galois group of the Galois closure of $K/{\mathbf Q}$ whose permutation action on the ${\mathbf Q}$-conjugates of $\alpha$ is a product of disjoint cycles where there are $e_i$ cycles of length $d_i$ for all $i$. I have a copy of a letter Serre sent to Thomas Hawkins in 2000 which outlines a method to give a counterexample where $[K:{\mathbf Q}] = 6$. That means this naive attempt to extend the Galois group existence technique to ramified primes doesn't generally work.

Here is an explicit example: $K = {\mathbf Q}(a)$ where $a^6 - 35a^4 + 3a^2 - 225 = 0$.
This field has degree 6 and Galois group $S_4$ over ${\mathbf Q}$. This Galois group acts on the roots in the way $S_4$ naturally permutes the 6 two-elements subsets of {1,2,3,4}: this is an embedding of $S_4$ into $A_6$, which will be important.

Using PARI, 3 factors in the integers of $K$ as $P^2Q$ where $P$ and $Q$ both have residue field degree 2. Now *if* there were a "corresponding" element of the Galois group of $K$ over ${\mathbf Q}$ as dreamed above, it would permute the 6 roots as a product of three disjoint 2-cycles. But alas, that is not an even permutation of the roots and I already said the Galois group is $S_4$ acting on the roots as a subgroup of $A_6$, so entirely by even permutations. Thus we have a contradiction so there is no such "dream automorphism" associated to 3 in the Galois group.

By the way, this degree 6 polynomial did not come out of nowhere: it is related to a 3-adic approximation of another polynomial, but that connection would take longer to describe than I wish to write about here, as this answer is already pretty long.