Nicotine gum is a form of nicotine replacement therapy that delivers a controlled dose of nicotine to reduce withdrawal symptoms, while varenicline is a non-nicotine medication that works by blocking nicotine receptors in the brain, reducing cravings and the pleasurable effects of smoking.