[ Preface: I am not pitching or otherwise trying to advertise this drug – I just thought the concept was interesting as I am currently attempting to quit smoking. There are, of course, alternatives to this drug. ]

How does CHANTIX work? First, you have to know how nicotine works.

There are receptors for nicotine in the brain. When smoke is inhaled, nicotine attaches to these receptors. This sends a message to a different part of the brain to release a chemical called dopamine. Dopamine gives a feeling of pleasure. But it only lasts for a short time. The body wants to repeat this feeling. Based on research, it is believed that CHANTIX™ (varenicline) works by activating these receptors and blocking nicotine from attaching to them. However, CHANTIX does not contain nicotine.

[ From Chantix.com ]

To be fair, I should also include the non-advertising links related to this medication: