The deterministic rotation of a ferromagnetic nanoparticle in a fluid is considered. The heating arising from viscous friction of a nanoparticle driven by circularly and linearly polarized alternating magnetic fields is investigated. Since the power loss of such fields depends on the character of the induced motion of a nanoparticle, all types of particle trajectories are described in detail. The dependencies of the power loss on the alternating field parameters are determined. The optimal conditions for obtaining the maximum heating efficiency are discussed. The effect of heating enhancement by a static field is analyzed. The results obtained are actual for the description of heating in the magnetic fluid hyperthermia cancer treatment, when the size of the particles used is a few tens of nanometers.