We propose a theoretical model of magnetic hyperthermia produced by a system of single-domain ferromagnetic particles in elasto-viscous and rigid media. Both mechanisms of the energy absorption, the internal remagnetization of the particles and their rotation under the field action are taken into account. Effects of magnetic interparticle interaction are in focus of our attention. Our analysis shows that the interaction can significantly enhance the heat production. The thermal effects in the elasto-viscous and rigid media are compared.