Many wonder how to get rid of heartburn. Here's what the experts suggest.

Experiencing heartburn is no fun. It causes an uncomfortable feeling in one's throat and a burning sensation in one's chest. While some people only experience unpleasant tastes in their mouth, others feel varying degrees of pain in their stomach, neck or esophagus. For some such individuals, that pain is so acute it can be mistaken for a heart attack. "Heartburn can be quite uncomfortable and really affect your quality of life," says Kyle Staller, MD, a gastroenterologist and the director of the Gastrointestinal Motility Laboratory at Mass General Hospital in Boston.

No matter how you experience heartburn - or how often - it can be helpful to know how to respond to and alleviate symptoms when they arise.

Is heartburn dangerous?

Though heartburn usually isn't dangerous on its own as millions of people experience it daily without serious incident, there are times when it can be a sign of something more concerning. For instance, several serious medical conditions mimic heartburn symptoms including gallstones, stomach ulcers, angina (a type of chest pain caused by reduced blood flow to the heart), and even some cancers such as esophageal cancer. "Understanding the cause of heartburn and seeking treatment for frequent occurrences is crucial," says Jennifer Horsley-Silva, MD, a gastroenterologist at Mayo Clinic. "This approach is not only important for improving symptoms, but also for preventing potentially serious complications if left untreated."

Heartburn can also be concerning for people with chronic respiratory conditions because it can aggravate breathing problems or conditions such as asthma, says Michael Fredericson, MD, director of the Physical Medicine and Rehabilitation division of Stanford University.

How to get rid of heartburn?

In most cases though, heartburn is not cause for serious concern, and there are many ways to avoid it and to get rid of it once it arises.

To prevent heartburn, Fredericson advises keeping a food journal to know which foods may have caused the burning sensation in the first place and then to avoid eating those foods. He also suggests not lying flat right after eating and to "resist the urge to overeat or eat quickly." Some more long-term steps to avoid heartburn include losing weight if you are medically overweight and stopping smoking if you smoke as both excess weight and cigarette smoke can make heartburn symptoms worse or cause them to occur more frequently.

Matthew Hoscheit, MD, a gastroenterologist at the Neurogastroenterology & Motility Center at Cleveland Clinic, also suggests dietary restrictions for people who have experienced frequent heartburn before, including the avoidance of foods like "chocolate, fried foods and tomato-based products" if such foods have proven to be problematic for you. And he suggests "reducing stress and getting enough sleep at night" as well.

When it comes to getting rid of heartburn once it starts, Hoscheit says that many people find heartburn relief through Alka-Seltzer and other over-the-counter antacid medications such as Tums, Mylanta or Rolaids. Stallar also suggests elevating your head "to keep stomach acid from flowing back into your esophagus" and to engage in light exercises or moving around to aid digestion.

Does drinking water help heartburn?

Another way to deal with heartburn when it arises is to drink water, milk, coconut water or herbal teas. Such liquids dilute irritants in one's throat and flush stomach acid back down into the stomach where it belongs. While water is thought to be the best beverage to drink when it comes to dealing with heartburn, there are also several drinks that are important to avoid. Alcohol and citrus juices, for instance, should be avoided, and soda can especially exacerbate matters worse due to the effect carbonation has on the stomach.

No matter which steps you choose to take to prevent or treat heartburn, Horsley-Silva says that "understanding the cause of your heartburn can empower you to take proactive measures to prevent it from persisting or recurring."

More: Though millions experience heartburn daily, many confuse it for this

This article originally appeared on USA TODAY: How to get rid of heartburn