Magnetic trapping is created by adding a spatially varying magnetic quadrupole field to the red detuned optical field needed for laser cooling.
The direction of the kick is given by the polarisation of the light, which is either left or right handed circular, giving different interactions with the different mf levels.