The details vary, but in general:
- The presence of the substance in the brain alters the production of neurotransmitters such as serotonin and especially dopamine.
- The brain adapts physically to the altered levels of those substances.
- At that point, it is necessary to continue the substance in order to feel anything like normal, even if one does not use enough to get high.
Recovery from addiction is largely a matter of sustaining the body and mind, physically and otherwise, until the brain has regained as close to normal functioning as it is able. This may take from months to years, depending on the drug, the amount used and how long the addiction continued before abstinence.
From the above, you can see that the absolute prerequisite for recovery from any addiction is total abstinence from substances or activities that create the same extreme chemical changes as the drug of choice.