  Heavy quarks are sensitive probes of the colour-deconfined medium formed in
ultra-relativistic heavy-ion collisions, the Quark-Gluon Plasma (QGP). The
ALICE Collaboration measured the production of $\rm D^0$, $\rm D^+$, and $\rm
D^{*+}$ mesons in Pb-Pb collisions at $\sqrt{s_{\rm NN}}=5.02$ TeV. The
properties of the in-medium energy loss are investigated via the measurement of
the nuclear modification factor ($R_{\rm AA}$) of non-strange D mesons. The
modification of the D-meson transverse momentum ($p_{\rm T}$) distributions
inside the jet is studied via the measurement of the D-meson tagged jet $R_{\rm
AA}$ in central Pb-Pb collisions. In mid-central collisions, the measurement of
the D-meson elliptic flow ($v_2$) at low and intermediate $p_{\rm T}$ gives
insight into the participation of the charm quark in the collective motion of
the system, while at high $p_{\rm T}$ it constrains the path-length dependence
of the energy loss. The coupling of the charm quark to the light quarks in the
underlying medium is further investigated with the application of the
event-shape engineering (ESE) technique to D-meson elliptic flow.
