Pauli's Exclusion Principle states that no two identical fermions in a given system can ever have the same set of quantum numbers. Here's how it works.
1. Fermions (particles with half-integer spin - 1/2, 3/2, ...) have antisymmetric total wave functions.
2. Consider two bound-state electrons as an example (electrons are spin 1/2 fermions), e.g. in a helium atom.
3. If the spin component is in one of the three symmetric triplet spin-states, then the spatial wave function must be antisymmetric: (ψk(x1)ψn(x2) - ψn(x1)ψk(x2))/√2
where ψk and ψn are energy eigenfunctions. Clearly n ≠ k here.
4. However, if we tried to put n=k, then the spatial wave function would vanish - this electron mode cannot exist.
5. However, we can have a symmetric spatial wave function:
in which case the spin state vector must be antisymmetric, viz. the singlet state, where the two electrons are each in a superposition of spin-up and spin-down:
([up,down> - [down,up>)/√2.
As a consequence, only these two electrons can occupy the n=1 (1s) shell, differing in their spin orientation which is the only degree of freedom they possess.
6. Note: if n ≠ k then the spatial wavefunction can still be symmetric for a pair of fermions thus:
(ψk(x1)ψn(x2) + ψn(x1)ψk(x2))/√2
In this case the spin state must be the antisymmetric singlet state as above.