Mental illnesses may be caused by a bad mixture of chemicals (neurotransmitters, etc.) in the brain. Drugs like Prozac are supposed to restore your out-of-whack brain stew to something more amenable to your mental health and welfare.

Other drugs, like cocaine, crystal meth, etc. temporarily bind to receptors in your brain, producing their respective euphoric effects. Those drugs, however, are generally not designed with long-term safe use in mind, and being a long-time user may leave you permanently whacked-out. Even marijuana, when ingested in mass quantities over a long period of time, will alter your brain's chemistry (arguably not for the better...).