This book provides a thorough introduction to the interaction of atoms and atomic ions with optical and magnetic fields. A general multi-level formalism is described in detail, and used to discuss optical pumping, two-dimensional spectroscopy and the cooling and trapping of atoms, among other topics.