For most people, a case of heartburn is just a nuisance taken care of by over-the-counter medication, but when the medicine cannot control the pain or the heartburn returns frequently, it is time to see your doctor. The burning and discomfort could be a sign of something far more serious, such as cancer of the esophagus.