- The serosa - the outer layer that acts as a covering for the other layers.
- Two muscle layers - the middle layers that propel food from the stomach into the small intestine.
- The mucosa - the inner layer made up of specialized cells, including parietal cells, g-cells and epithelial cells.
The g-cells produce gastrin, a hormone that facilitates the production of hydrochloric acid by the parietal cells.
The stomach is protected by the epithelial cells, which produce and secrete a bicarbonate-rich solution that coats the mucosa. Bicarbonate is alkaline, a base, and neutralizes the acid secreted by the parietal cells, producing water in the process. This continuous supply of bicarbonate is the main way that your stomach protects itself from autodigestion (the stomach digesting itself) and the overall acidic environment.
In some individuals, due to impairments in blood supply to the stomach, or to overproduction of acid, this defense system does not work as well as it should. These people can get gastric ulcers. There are also specific bacteria, called Helicobacter pylori, that may cause impairment of the stomach's defenses and can also be responsible for ulcers.
Here are some interesting links:

