Whether you are addicted to alcohol, street drugs, prescription drugs, gambling, food, or nicotine, the neurological pattern that develops is the same. The reward center in your brain is underactive, and it takes more in life to tell that part of your brain that you're having a good time. Nothing but the addiction seems to satisfy that reward center, and the brain is tricked into thinking that the addiction is necessary for survival.
Quick bursts of exercise at 70-80% of one's maximum aerobic threshold for at least 30 minutes a day can give your brain's reward center the quick burst of dopamine that it's looking for when feeling a craving to use a substance (or behavior). Not only that, exercise rebalances all of your mood related neurotransmitters and releases BDNF, a factor which is like Miracle Gro for your brain. It helps to grow new brain cells in areas of the brain that tend to shrink with depression and substance abuse.
One of the neatest things that exercise does is release endorphins, which are chemical cousins with synthetic morphine. Releasing your body's natural pain killers is one reason for that infamous "runner's high." Endocannabinoids are thought to be the other reason for this phenomenon. These are the receptors in the brain associated with marijuana, and there are two other activities that can fill these receptors: exercise and eating chocolate. The ability to do something that is within your own control builds a sense of self efficacy, something that's missing in individuals who feel powerless and helpless to control addictions.
Exercise simultaneously builds new neural networks within the brain, decrease cravings, significantly reduce withdrawal symptoms, address underlying depression and anxiety, and fill the void often left behind after addictive behaviors stop. One excellent example of how well exercise can help correct addiction is a popular recovery program in Manhattan. This program attributes it's significantly higher rate of recovery success to the inclusion of an exercise program, and some of it's graduates run in the NYC Marathon each year.
If you're trying to quit smoking or stop drinking your lunchtime chardonnay with a straw, make exercise your new best friend. Buy a jump rope and do 10 minute bursts, or even buy a mini trampoline to use when cravings hit. The "hit" of exercise will be a good replacement for reducing tension, and you'll have more energy, too.