Electron capture on nuclei plays an essential role in the dynamics of several astrophysical objects, including core-collapse and thermonuclear supernovae, the crust of accreting neutron stars in binary systems and the final core evolution of intermediate-mass stars. In these astrophysical objects, the capture occurs at finite temperatures and densities, at which the electrons form a degenerate relativistic electron gas. The capture rates can be derived from perturbation theory, where allowed nuclear transitions [Gamow–Teller (GT) transitions] dominate, except at the higher temperatures achieved in core-collapse supernovae, where forbidden transitions also contribute significantly to the capture rates. There has been decisive progress in recent years in measuring GT strength distributions using novel experimental techniques based on charge-exchange reactions. These measurements not only provide data for the GT distributions of ground states for many relevant nuclei, but also serve as valuable constraints for nuclear models which are needed to derive the capture rates for the many nuclei for which no data yet exist. In particular, models are needed to evaluate stellar capture rates at finite temperatures, where capture can also occur on nuclei in thermally excited states. There has also been significant progress in recent years in the modeling of stellar capture rates. This has been made possible by advances in nuclear many-body models as well as in computer soft- and hardware. Specifically, to derive reliable capture rates for core-collapse supernovae, a dedicated strategy has been developed based on a hierarchy of nuclear models specifically adapted to the abundant nuclei and astrophysical conditions present under various collapse conditions. In particular, for the challenging conditions where the electron chemical potential and the nuclear Q values are of the same order, large-scale shell-model diagonalization calculations have proved to be an appropriate tool to derive stellar capture rates, often validated by experimental data. Such situations are relevant in the early stage of the core collapse of massive stars, for the nucleosynthesis of thermonuclear supernovae, and for the final evolution of the cores of intermediate-mass stars involving nuclei in the mass range A ∼ 20–65. This manuscript reviews the experimental and theoretical progress recently achieved in deriving stellar electron capture rates. It also discusses the impact these improved rates have on our understanding of the various astrophysical objects.