The esophagus and stomach are connected by a valve known as the Lower Esophageal Sphincter (LES). Generally, this valve opens to allow for food and liquid to pass from the esophagus into the stomach, but otherwise remains closed.
When the LES is not functioning properly, stomach contents, including acid, can flow backwards into the esophagus. This is often the cause of GERD.
A healthy LES stays closed except to allow for passage of food and drink into the stomach.
If the LES is weak, acid and stomach contents can flow backwards into the esophagus, causing discomfort and irritation.