Manipulating atoms with photons