Does smoking a cigarette relieve heartburn?

NO. Smoking leads to increased acid reflux typically! smoking reduces the protective mucous layer in the stomach which also predisposes smokers to ulcers and stomach cancer.
Usually CAUSES it. In most people, tobacco smoke, and probably the nicotine itself (which is a muscle relaxant) causes the lower esophageal sphincter, the valve separating the stomach for the gullet, to relax and allow acid from the stomach into the esophagus, causing heartburn. I have not heard of a patient ever saying that a cigarette improved it. Being overweight and use of alcohol are also risk factors.