  Heavy quarks are effective probes of the hot and dense nuclear matter, the
quark-gluon plasma, produced in ultra-relativistic heavy-ion collisions. Due to
the short time scale characterising their production, heavy quarks experience
the whole evolution of the system. In particular, measurements of heavy-flavour
hadron production in Pb-Pb collisions at LHC energies give insight into the
mechanisms of heavy-quark transport in the deconfined matter. In small hadronic
systems, pp and p-Pb collisions, heavy-flavour measurements provide the
baseline for observations of hot-medium effects in heavy-ion collisions, as
well as tests of perturbative quantum chromodynamic calculations and
measurements of cold-nuclear-matter effects. In this contribution, recent ALICE
results on open heavy-flavour hadron production in pp, p-Pb and Pb-Pb
collisions at various energies are discussed. New measurements are presented
both for fully-reconstructed charmed hadrons and for single electrons from
heavy-flavour hadron decays, also investigating the beauty-quark production via
the measurement of D mesons and electrons from beauty-hadron decays.
