Medical marijuana is legal for those to whom it is prescribed, but no one else. In states where marijuana isn't legal, anyone caught with the drug without a prescription can be charged with possession. Generally speaking, those who take medical marijuana are either suffering from long-term symptoms of pain or epilepsy or are terminally ill. This treatment is used for pain relief and as a kind of treatment, which is why it's been allowed.
Marijuana, whether medical or standard, is the same drug. It's classified as a Schedule I drug and isn't recognized as a safe drug to use under medical supervision. On top of that, there are no currently accepted medical uses for medical marijuana in the United States.
Because of the debates over marijuana and its use in medicine, someone taking the drug for medical purposes could get caught up in drug possession charges. Medical marijuana laws are still constantly changing, and some states have decided to legalize the use of the drug both recreationally and as a medical treatment. Despite states making marijuana legal, the federal Supreme Court has reported that the use of marijuana for any purpose, whether medical or recreational, is illegal.
Medical marijuana is legal in several states including Colorado, Connecticut, Alaska, Vermont, Washington, New Jersey, Nevada and others. There are boundaries to the legality of the drug in some of those states. For example, in some states, a doctor must submit written documentation explaining why a patient needs medical marijuana. This results in a patient obtaining a marijuana ID card, which then can be used in the case of an arrest.
Source: FindLaw, "Medical Marijuana - An Overview," accessed July 29, 2015