This is a very interesting question. As I’m sure you are aware, the regulation of stomach acid/enzyme production and secretion is a necessarily complex subject. The stomach has to be able to be turned off when we aren’t eating, but be rapidly turned on when we do eat a meal. In short, histamine acts to increase hydrochloric acid (HCl) secretion by cells in the stomach lining called parietal cells. The story is a little more involved though.
There are lots of cells that make up the lining of the stomach. One kind of cell is the G cell. The G cells are directly innervated by the vagus nerve (one of the cranial nerves). Special nerve fibers in the vagus nerve secrete a chemical called gastrin-releasing peptide. This tells the G cells to release a paracrine (a chemical reeased by one cell that affects cells nearby) hormone called gastrin. The gastrin is detected by enterochromaffin-like (ECL) cells by receptors on their membranes (one of these receptors is the CKK2 receptor). When they detect the gastrin they begin to synthesize and release histamine. Parietal cells then come into play. They have several different kinds of receptors on their surface. One, the H2 receptor, detects histamine. When the ECL cells flood the lining of the stomach with histamine, the parietal cells are cued to release HCl. They also have receptors for gastrin (the same chemical released by the G cells) and acetylcholine, a neurotransmitter. Any of these chemicals can stimulate the parietal cells to secrete HCl into the stomach. The website links below offer some great illustrations of this admittedly complex pathway.
Like many activities our body must carry out, stomach acid production is highly regulated. Many stomach diseases (such as ulcers and GERD) are either directly or indirectly caused by a lack of regulation of HCl in the stomach. In this way, stomach acidity can be decreased by blocking vagus nerve stimulation, by blocking gastrin- releasing peptide release, by blocking gastrin release, or by blocking histamine release. Neat, huh?
A. K. Sandvik and H. L. Waldum. "CCK-B (gastrin) receptor regulates gastric histamine release and acid secretion." Am J Physiol Gastrointest Liver Physiol, Jun 1991; 260: 925 - 928.
Erik Lindström, Duan Chen, Per Norlén, Kjell Andersson and Rolf Håkanson. "Control of gastric acid secretion:the gastrin-ECL cell- parietal cell axis." Comparative Biochemistry and Physiology - Part A: Molecular & Integrative Physiology. Volume 128, Issue 3 , March 2001, Pages 503-511
R. Bowen. Enterochromaffin-Like (ECL) Cells. The Stomach. A: 15 January 2007, P: 31 January 2003.http://www.vivo.colostate.edu/hbooks/pathphys/digestion/stomach/ecl_cells.html.