  Heavy quarks, i.e. charm and beauty, are considered calibrated probes for the
strongly interacting deconfined medium (Quark Gluon Plasma, QGP) formed in
heavy-ion collisions. Produced in hard scattering processes in the initial
stages of the collision, they interact with the medium, lose energy and,
depending on the coupling strength to the medium, take part in the collective
motion of the QCD matter. ALICE measured the production of ${\rm D^{0}}$, ${\rm
D^{*+}}$, ${\rm D^{+}}$ and ${\rm D_{s}}$ mesons at central rapidity in pp,
p-Pb and Pb-Pb collisions at the LHC. The study of the modification of the
transverse momentum differential yields of charm particles in Pb-Pb collisions
with respect to pp collisions, quantified by the nuclear modification factor
($R_{\rm AA}$), can unravel details of the energy loss mechanism, such as its
dependence on the quark mass and on the path length the parton travels through
the medium. A similar comparison between pp and p-Pb collision data ($R_{\rm
pPb}$) is fundamental to disentangle effects related to the presence of the hot
medium from cold nuclear matter effects. The degree of thermalization and
coupling to the medium is investigated in semi-peripheral Pb-Pb collisions by
measuring the elliptic flow coefficient ($v_{2}$) at low pt. At high pt,
$v_{2}$ is sensitive to the path-length dependence of the energy loss. Results
on the transverse momentum and centrality dependence of the D-meson elliptic
flow and $R_{AA}$ will be presented. The comparison with the $R_{\rm AA}$ of
non-prompt ${\rm J/}\psi$ from B-meson decays measured with CMS will be
discussed. The preliminary results on D-meson $R_{\rm pPb}$ and the dependence
of D-meson yields on rapidity in p-Pb collisions will be shown. As an outlook,
the analysis and the preliminary results on the azimuthal correlations of D
mesons and charged hadrons in pp collisions will be described.
