The brain is responsible for manufacturing a neurotransmitter known as dopamine. When one is excited, dopamine is released in large quantities. Drugs such as alcohol, nicotine, and opiates enhance the release of dopamine in the body. This makes the brain limit the amount of dopamine it produces.
The problem comes when you try to quit drugs, as you will feel moody and depressed since the brain produces little or no dopamine, while at the same time you have cut out the only source where you were getting a regular supply: drugs. This makes people continue using drugs in an attempt to suppress the depression.