The stomach of a healthy human maintains itself at a very low pH in order to accomplish a couple very specific tasks. The stomach acts as the holding tank for the first part of digestion immediately following chewing and swallowing. The first jobs is to aid in breaking apart molecules into smaller more digestible bits for our body through chemical interactions after the chewing part of eating has broken the food apart some. The second is to act as a major line of defense against external pathogens, bugs that live in your food that would love to live inside you, that would do lots of damage if they were to get past your stomach. The last is to signal the rest of the digestive system, especially the pancreas that it needs to deliver digestive enzymes to farther digest food.
pH is the measure of how acidic or basic a substance is. An acid is defined as a molecule that produces hydrogen ions when dissolved in water. Bases, the other end of the spectrum, create metal ions and hydroxide ions when they dissolve in water. pH is the measure of how much H3O+ is found in the solution. On this scale from 0 to 14, 7 is neutral, for example HCl is pH 1 while NaOH is pH 14. Stomach acid ranges around pH 1.6, very acidic.
Stomach acidity is maintained by a sophisticated proton pump that uses H+ and K+ and allows the acid level to stay high enough to do the work it needs to but also to keep from burning through the epithelial tissues of the stomach. Humans can interrupt this delicate balance by introducing too many alkaline foods into the diet over a long period of time as is the case with the standard American diet, certain surgeries can remove or block the location of the cells that produce HCl, certain bacterial infections such as H. Pylori and gastric cancer, or antibiotics and medications can also inhibit production of gastric acid.
When the acidity in the stomach is too high, conditions such as GERD and esophageal degradation can occur. When acid is too low, a much more regular finding as the standard American diet fosters a higher pH in the stomach, this lead to both vitamin B deficiency and protein deficiency as the initial digestion is unable to happen in such an alkaline environment. One can adjust the acidity of the stomach with careful diet and stress regulation.
References
Beasley, D. E., Koltz, A. M., Lambert, J. E., Fierer, N., & Dunn, R. R. (2015). The Evolution of Stomach Acidity and Its Relevance to the Human Microbiome. Plos ONE, 10(7), 1-12. doi:10.1371/journal.pone.0134116
Marcus, E. A., Sachs, G., & Scott, D. R. (2013). The Role of Exb D in Periplasmic pH Homeostasis in Helicobacter pylori. Helicobacter, 18(5), 363-372. doi:10.1111/hel.12055