pH monitoring is a diagnostic procedure used to measure the acidity or alkalinity of the stomach and esophagus over a specific period. This technique helps in evaluating conditions like peptic ulcer disease and gastroesophageal reflux disease (GERD) by providing insights into the correlation between acid exposure and symptoms experienced by patients.