Ultimately all sickness stems from karma (which refers to both actions and their effects).
What we term “karmically caused illness” differs from ordinary illness, however, in that it does not respond to treatment, or if it does, a new disease soon replaces it.
Medicines that work for others prove ineffective, and one affliction after another undermines one’s well-being.
If one seeks spiritual guidance because the doctors have failed, a lama might suggest doing purification practice or saving the lives of others (bait worms or shrimp, for example). After some practice, one might finally find the right medical treatment, or the illness might simply abate with no other treatment.
With very stubborn illnesses or in terminal cases, purification practice offers reassurance that in future lifetimes one will not confront the results of that same karma.
Some years ago, a woman in Switzerland opened her private interview with Chagdud Rinpoche by stating, “I have cancer. Two operations have failed to cure it, and now I am going to die.” She said this with no emotion whatsoever and Rinpoche did not contradict her.
He only suggested that purifying karma would benefit her preparations for death. She accepted this, so he gave her a Red Tara practice, and a generous Swiss student offered her a place to do retreat for a month or two.
Rinpoche never saw her again, but later learned that she did indeed do a very diligent retreat, that all of her symptoms disappeared and she lived on for years.
In delineating what to abandon and what to accept, Buddhist doctrine categorizes karma into the ten non-virtues and ten virtues.
Source: Tromge, Jane. Ngondro Commentary: Instructions for the Concise Preliminary Practices of the New Treasure of Dudjom. Compiled from the teachings of H.E. Chagdud Tulku Rinpoche by Jane Tromge. Junction City, CA: Padma Publishing, 1995.