The goal of ultrarelativistic heavy-ion collisions at RHIC and the LHC is to study the properties of the quark-gluon plasma (QGP), a high-temperature phase of deconfined quarks and gluons. Electromagnetic radiation, in form of photons or lepton pairs, is a penetrating probe that allows the investigation of the full time evolution and dynamics of the produced matter, as it does not undergo strong final-state interactions. The dilepton spectrum is extremely rich in physics sources: Thermal black-body radiation is of particular interest as it carries information about the QGP temperature. Medium modifications of the spectral function of short-lived vector mesons are linked to the potential restoration of chiral symmetry at high temperatures. Correlated lepton pairs from semi-leptonic charm and beauty decays provide additional information about the heavy-quark energy loss. In this colloquium, the SPS and RHIC dilepton results will be reviewed before the latest results from ALICE at the LHC will be discussed. Finally, the prospects for future low-mass dilepton measurements will be given.