Heartburn occurs when stomach acids reflux, or flow up, into the esophagus. Prilosec OTC ® is only indicated for the treatment of frequent heartburn. If you think you may have any of the symptoms described below, please talk to your doctor or healthcare provider.