This question has been nagging mer for a very long time now. Obviously, I've had my share of swallowed gums (mostly because I had to avoid getting caught by my teachers).
The usual answers (e.g. it will stay in your stomach forever) are not acceptable to me, for obvious reasons.
I had time to search for the answer over the web, and the most satisfactory answer is by Mayo Clinic:
Although chewing gum is designed to be chewed and not swallowed, it isn't harmful if swallowed. An old wives' tale suggests that swallowed gum sits in your stomach for seven years before it can be digested. But this isn't true. If you swallow gum, it's true that your body can't digest it. But the gum doesn't sit in your stomach. It progresses relatively intact through your digestive system and is excreted in your stool.
In other words, you just poop it out. However, the explanation offered by Thunder Dragon may also be another plausible explanation. Here is the illustration: