You get indigestion when the acid in your stomach flows up your oesophagus(the pipe from your mouth to your stomach) or when your stomach is irritated or inflamed. Indigestion is most common after meals, but you can get it at any time.
Attribution: BUPA