Medical marijuana is being used to treat the autoimmune disease Systemic Lupus Ertyhematosus, which is when the body starts attacking itself for some unknown reason.
Some chemicals in marijuana seem to have a calming effect on the immune system, which may be how it helps deal with symptoms of Lupus. The rest of the positive impact of the marijuana is probably from the effects on pain and nausea.