Peptic ulcers develop in the lining of the stomach or small intestine. Common causes are infection by H. pylori bacteria and use of pain medications like ibuprofen. Symptoms include stomach pain that is worse when the stomach is empty. Diagnosis involves tests to detect H. pylori infection and endoscopy to view the digestive tract. Treatment eliminates the bacteria with antibiotics if present, reduces acid production, and promotes healing with proton pump inhibitors or acid blockers. Preventive measures include careful use of pain medications and protecting against infections.