Gastric acid, gastric juice or stomach acid, is a digestive fluid formed in the stomach and is composed of hydrochloric acid (HCl), potassium chloride (KCl) and sodium chloride (NaCl). The acid plays a key role in digestion of proteins, by activating digestive enzymes, and making ingested proteins unravel so that digestive enzymes break down the long chains of amino acids.

Gastric acid is produced by cells in the lining of the stomach, which are coupled in feedback systems to increase acid production when needed. Other cells in the stomach produce bicarbonate, a base, to buffer the fluid, ensuring that it does not become too acidic. These cells also produce mucus, which forms a viscous physical barrier to prevent gastric acid from damaging the stomach. The pancreas further produces large amounts of bicarbonate and secretes bicarbonate through the pancreatic duct to the duodenum to completely neutralize any gastric acid that passes further down into the digestive tract.

More Info: en.wikipedia.org