Depending on the drug that is taken either by injection, eating, smoke, etc. also depending on the chemical structure of the drug, it will either mimic the brain's natural chemical messengers, or over stimulate the "reward circuit" of the brain. Drugs like marijuana and heroin are drugs the mimic neurotransmitter that naturally occurs in our bodies.
Drugs like cocaine an methamphetamine cause nerves to release too much dopamine "a natural neurotransmitter", or prevent the normal