Dileptons are unique probes to study the space--time evolution of ultrarelativistic heavy-ion collisions since they are produced continuously and carry unaffected information on the production source.
The dilepton invariant-mass spectrum is sensitive to in-medium effects of low-mass vector mesons, connected to the partial chiral symmetry restoration, and to thermal radiation emitted in the partonic and hadronic phases.
The study of dilepton production in pp collisions provides a fundamental baseline for the measurement in heavy-ion collisions and allows for the tuning of light particle production models at LHC energies.
\newline
The final results of the dielectron measurement in Pb--Pb collisions at $\mathbf{\sqrt{{\textit{s}}_{\mathrm{NN}}}}$ = 2.76 TeV and the preliminary results in Pb--Pb collisions at $\mathbf{\sqrt{{\textit{s}}_{\mathrm{NN}}}}$ = 5.02 TeV are presented. The preliminary results of the $\phi$-meson production measurement in pp collisions at $\mathbf{\sqrt{{\textit{s}}}}$ = 5.02 TeV using the dimuon channel, and the center-of-mass energy dependence of its production cross section in pp collisions are also shown.