We present the results of experimental studies on the transverse and longitudinal dynamics of a single electron in the IOTA storage ring. IOTA is a flexible machine dedicated to beam physics experiments with electrons and protons. A method was developed to reliably inject and circulate a controlled number of electrons in the ring. A key beam diagnostic system is the set of sensitive high-resolution digital cameras for the detection of synchrotron light emitted by the electrons. With 60--130 electrons in the machine, we measured beam lifetime and derived an absolute calibration of the optical system. At exposure times of 0.5~s, the cameras were sensitive to individual electrons. Camera images were used to reconstruct the time evolution of oscillation amplitudes of a single electron in all 3~degrees of freedom. The evolution of amplitudes directly showed the interplay between synchrotron-radiation damping, quantum excitations, and scattering with the residual gas. From the distribution of measured single-electron oscillation amplitudes, we deduced transverse emittances, momentum spread, damping times, and beam energy. Estimates of residual-gas density and composition were calculated from the measured distributions of vertical scattering angles. Combining scattering and lifetime data, we also provide an estimate of the aperture of the ring. To our knowledge, this is the first time that the dynamics of a single electron is tracked in all three dimensions with digital cameras in a storage ring.