Heartburn occurs when stomach acid flows upward into the esophagus. It is usually felt as a burning sensation or pain behind the breastbone and is often accompanied by a bitter taste. Reflux describes the process in which stomach juices seep back into the esophagus.