Indigestion is caused when stomach acid comes into contact with the lining of the digestive tract, leading to problems like stomach pain or swelling.