The dynamics of spin-lattice relaxation of the Mn-ions in (Zn,Mn)Se-based diluted-magnetic-semiconductor quantum wells is studied by time-resolved photoluminescence. The spin-lattice relaxation time varies by five orders of magnitude from 10-3 down to 10-8 s, when the Mn content increases from 0.4 up to 11%. Free carriers play an important role in this dynamics. Hot carriers with excess kinetic energy contribute to heating of the Mn system, while cooling of the Mn system occurs in the presence of cold background carriers provided by modulation doping. In a Zn0.89Mn0.11Se quantum well structure, where the spin-lattice relaxation process is considerably shorter than the characteristic lifetime of nonequilibrium phonons, also the phonon dynamics and its contribution to heating of the Mn system are investigated.