J.R. S. answered 04/24/19
Ph.D. University Professor with 10+ years Tutoring Experience
The stomach cells have mucosal cells which secrete mucin which protects the stomach cells from the HCl. Basically, the cells that come in contact with the secreted HCl are protected from the harmful effects of the acid. This is the short and simple answer.