Food in the stomach, principally the protein content, stimulates release of acid. Inhibition of acid flow can occur by other chemicals present in the antral mucosa. Somatostatin is one such chemical. Fat in the duodenum also inhibits acid flow. Stimulation of the vagus nerve is responsible for acid flow.
Pepsinogen is an enzyme in the stomach responsible for the formation of pepsin.
Both acid and pepsin can corrode the gastric mucosa. Secretion of mucus is a potent inhibitor of the corrosive effects. Bicarbonate ion secreted from the gastric mucosa is another. Once acid is secreted it cannot flow back into the cells as there is an effective barrier to this back flow. If this barrier is broken, cellular injury may result.