Magnetic nanoparticles can be used to destroy cancer cells. The knowledge of the rheological properties of the cancer cells allows to model the motion of the particles at the surface of the membrane and to get a better understanding of the mechanisms. We have carried out a general analysis of the AFM tip motion which contains both the indentation and relaxation steps, allowing a better determination of the rheological parameters of cancer cells. The knowledge of the viscoelastic behavior of these cells allowed us to predict their indentation by magnetic particles submitted to an alternative field gradient. We proved that the application of an alternative magnetic field of low frequency (a few Hertz) in the presence of magnetic microparticles was able "in vitro" to destroy cancer cells, and a constant magnetic field was far less efficient than an oscillating one. Besides magnetolysis by mechanical way we have also shown that cobalt nanoneedles presented an important hysteresis cycle which can be used for hyperthermia treatment of cancer cells at frequencies as low as 10 kHz.