So basically there's a synapse, which is kind of an open space between the receptors and the carrier blobs (forgot what they're called :S)
Anyway, this type of system works the same for Dopamine and Serotonin. Dopamine is pleasure, motivation, and attention. Serotonin is positive thinking, confidence and the sense of well-being.
Nobody knows exactly why these molecules do what they do... yet.
So for the time being let's focus on the serotonin one.
So there's a bunch of serotonin molecules in the carrier blog thing. In normal life, there's a rate at which serotonin is released from the carrier blobs into the synapse and a rate of which it goes back in. The more serotonin is in the synapse, the more likely a receptor is going to touch a serotonin molecule, making you feel better.
Before I continue, I'd just like to say a disclaimer: This is all of memory so if some of these are wrong please correct me. Thanks.
MDMA (Ecstasy) prevents ecstasy from going BACK into the carrier blobs. This means that, as serotonin is released into the synapse, it is unable to go back in. It continuously will touch the receptors, making you feel fuckin awesome. Eventually your brain will kill off all that serotonin in the synapse and the MDMA will be flushed out of your sistem.
LSD and Psilocin (Mushrooms) work in a different. These ones "pretend" to be Serotonins. Now without going into much detail, there are many types of serotonins, each one has a specific(s) function(s). The 5-HT2a is where you see things morph and stuff. These drugs activate the 5-HT2a mostly which is why you trip out.
The dopamines work the same way. These (in my opinion) are drugs that are less eye-opening and more "feel-good" drugs. The don't provide any spiritual benefits or long-term happiness (IN MY OPINION).
Weed works on dopamine. Weed act the same way as endorphins. Endorphins encourage dopamine molecules to be released into the synapse. It basically amplifies good feelings.
Cocaine is to Dopamine as Ecstasy is to Serotonin. Cocaine blocks dopamine molecules from re-entering the carrier blobs. This makes you feel like the fuckin man (a "rewarded" feeling - like when you win the lottery, that's what dopamine is for).
These is where things get interesting:
Speed (amphetamine) is like cocaine, except that it not only blocks re-uptake, it also pumps out dopamine. So, it's a lot more powerful. Why it's less potent - I don't know. Someone else will have to explain this. I have a theory but it's too complicated to write here.
Okay - so - what happens when you run out of dopamine in your carrier blobs to be pumped into the synapse? Well, that's where meth comes in handy.
Not only does meth block the re-uptake, AND pump dopamines back into the system, it also has your body CREATE more dopamine. So what you get is a tripple wammy effect of awesomeness.
Heroin is basically endorphins x 1000 (like weed, but they probably work on different types of dopamines).
Hope that helps