We present detailed discussions of cooling and trapping mechanisms for an a
tom in an optical trap inside an optical cavity, as relevant to recent expe
riments. The interference pattern of cavity QED and trapping fields in spac
e makes the trapping wells, in principle, distinguishable from one another.
This adds considerable flexibility to creating effective trapping and cool
ing conditions and to detection possibilities. Friction and diffusion coeff
icients are calculated in and beyond the low excitation limit and full thre
e-dimensional simulations of the quasiclassical motion of a Cs atom are per
formed.