When an atom moves in the presence of the laser beams, it experiences a varying light shift due to the intensity gradient of the laser light. This variation in the light shift creates an optical force that opposes the atom's motion, causing it to slow down. Atoms moving in the direction opposite to the laser beams experience the largest light shifts, leading to effective cooling.