Image: astanhope [Flickr]
From astanhope's Flickr set on Thailand, here's a statue of the Fasting Buddha at the Wat U-Mong temple in Chiang Mai, Thailand.
The short version of the story goes like this: After the young prince Siddhartha Gautama left his palace to search for enlightenment, he lived as an ascetic for six years. The emaciated Siddharta finally attained enlightenment and became Buddha (The Enlightened One) when he discovered the Four Noble Truths [wiki]. The statue above depicts this part of his life.
If you're only familiar with the fat Buddha, here's another fact for you: it is not Siddharta at all. There are 28 Buddhas, of which Siddharta was one.
Siddhartha left his life of decadence, and then he became an ascetic, only to realize that the truth doesn't lie in either of the two extremes, hence his term "The Middle Way". He did not become enlightened until after his ascetic phase. Sorry to be the guy that corrects everything...
He left his life of luxury as a young man to be a wandering ascetic. During that time he tried any number of the things that ascetics do, including "mortification of the flesh," which is reflected in (rare) images of him emaciated.
As for "Happy Buddha" being fat, etc... The Happy Buddha image that we are all familiar with is not a Buddha or "the" Buddha, but rather a beloved and influential Chinese Buddhist monk usually called "Ho Tai" who lived sometime between the 11th and 14th centuries, if I remember correctly.