Heavy quarks are produced in the early stages of nucleus-nucleus collisions and can therefore provide important insight into the Quark–Gluon Plasma (QGP). Quarkonia are proposed as crucial probes to study the QGP. The extent of the medium modification for heavy-quark quarkonium production in heavy-ion collisions is measured in terms of a nuclear modification factor RAA, defined as the quarkonium yield in heavy-ion collisions divided by the relative quarkonium cross section in pp collisions scaled by the nuclear overlap function. A possible path-length dependent quarkonium dissociation, as well as a contribution of (re-)generation of quarkonia from heavy quarks in the medium, would lead to an azimuthal anisotropy of quarkonium production relative to the reaction plane. In this contribution, the recent ALICE measurements of quarkonia in Pb–Pb collisions at sNN=5.02TeV will be discussed for both mid- and forward rapidity. The dependence of RAA on centrality and pT for J/ψ, ϒ(1S), ϒ(2S), as well as the J/ψ elliptic flow ν2 will be shown. Comparisons between the experimental data and the current theoretical model calculations will be also discussed.