If an atoms to polarize moves through a weak magnetic field, the degeneracy of their electronic levels will break up (Zeeman effect). In the weak field the total angular momentum F = J + I is still a good quantum number, nuclear and electronic spin stay coupled. The resulting levelscheme is split up into levels ordered corresponding to the quantum numbers m(F).
The mechanism of polarizing the spin of atoms is based on the selection rules for electromagnetic radiation from atomic transition. If the excitation by the photon of the proper wavelength is done with circular polarized light, only transitions with Δm = +1, -1. If the light is right circularly polarized, only transitions with Δm = +1 are allowed.
The two effects - levels splitting up in a weak magnetic field in combination with circular polarized light - can be used to selectively change the population of the electronic levels:
The excitation always causes an transition towards the HIGHER m(F), whereas the decay can take place with all allowed transitions: Δm = +1, -1, 0.
If the atom goes through many excitation / decay cycles, the electron will and up in the state with the highest quantum number m(F). As an effect the atom gets spin polarized with respect to the quantization axis - the direction of the magnetic field. If one looks at a large number of atoms, the net effect is a change in population of the different levels towards the level with the highest spin.
When the atom enters the strong field of the ß-NMR, the quantum number F is no longer a good quantum number, the spins decouple. The polarization of the total atomic spin is transfered to the electron shell on the one hand (this gets lost when the atom is stopped in the crystal), and the nucleus on the other hand. The polarization of the nuclear spins remains for a long time (depending on the relaxation time of the spins in the crystal), and makes it possible to do apply NMR methods to the polarized sample of nuclei.