It states that no two electrons in an atom can have the same set of four quantum numbers. One of these quantum numbers describes the electron's spin, which can be either spin-up (+1/2) or spin-down (-1/2).
Therefore, if two electrons occupy the same orbital (same n, l, and ml quantum numbers), they must have opposite spins to fulfill the Pauli Exclusion Principle.