The Gastric glands present in the stomach produce hydrochloric acid, enzyme pepsin, and mucus.
Mucus act as a cover and protects the inner lining of the stomach from the action of Hydrochloric acid and enzymes.
In absence of Mucus, the inner lining will be eroded and can cause acidity and ulcer.