How does stress affect your digestive system and lead to stomach pain?

How does stress affect your digestive system and lead to stomach pain?