At least in part, by using up nutrients in the medium. I've had contaminated cells (I didn't know it at the time) survive on amino-acid rich medium, but die on standard high glucose DMEM.
Belinda's answer suggests that low serum medium maybe a way to purge the culture of mycoplasma. Of course, this would have to be brief in order to selectively kill mycoplasma and not the contaminated cells.
I suspect that the mycoplasma will turn out to be the more robust, given what happened to those cultures... Also, the serum wasn't different, just the amino acid composition of the medium itself. We had needed to put those cells on the other medium for a labelling experiment, and it went fine for a few weeks, then they died. If tthe cells are clean, they should have no problem with standard DMEM.
In my experience you cannot completely remove mycoplasma by the usage of minimal media. We are talking of bacteria here where you only need very few surviving cells to keep the contamination present. It will only take a while then and they grow up again. For this purpose you have to either use special antibiotics or discard the cells (which is more safe) and make sure you get rid of everything which has been contaminated.
Indeed, one reasonably efficient way to get rid of mycoplasms is to use the antibiotics Thiamulin and Minocyclin alternatingly for at least three weeks. Cell cultures thus treated need to be tested again regularly for the treatment may have only suppressed mycoplasm growth, but not completely eliminated them. Different species of Mycoplasm also have different sensitivity to these antibiotics.
Takara has a good (easy to use and sensitive) kit for testing Mycoplasm contamination by PCR.
There is a good website that has a lot of information about mycoplasma and their effects on cell culture (check the "Mycoplasma Resource Center" tab) - it is a company that has been in the business of mycoplasma testing for a long time (over 20 years) - http://www.bionique.com/ - they also offer elimination services but my opinion would be to throw away the affected culture (it will be cheaper) and start a new mycoplasma-negative culture growing.
If you want to test rapidly if you have a mycoplasma contamination in your cell culture, you can use the MycoAlert™ detection kit of Lonza. It very easy to use and give results rapidly. You need only a small sample of your culture medium (100 µl), you centrifugate, then you put the substrate reagent and next the reagent itself. You make two measurements at the luminometer. The ratio of the two luminescence value gives allows you to know if your cell culture is contaminated (ratio > 1 or upper) or not (ratio < 1). I use it currently and I am very satisfied of this kit. If you have cell contamination, you can treat with Plasmocin, but it do not clean completely your cell culture of mycoplasmas, as when you stop the treatment, mycoplasma contamination increase again.