http://www.mariomonsters.com/goomba/
(excerpt from the background section):
The original story behind Little Goombas is that they were mushroom people who had defected to Bowser's army.
full article
GAMES: SMB, SMB3, SMBLL, SML, SML2, SMW, SMW2, SMRPG, SM64, PM, SMS, ML, PM2, ML2. Little Goomba!
TYPE: Fungus
TURF: Grasslands, Tundra, Desert, Mountains, Castles, Caves, Forests.
AFFILIATIONS: Koopa Troop.
CLOSE RELATIVES: Paragoombas, Spiked Goombas, Giant Goombas, Micro Goombas.
HP: ML: 4
PM: 2
SMRPG: 16
FP: 1
OFFENSE: ML: 17
PM: 1
SMRPG: 3 (Normal) 1 (Magic)
DEFENSE: ML: 11
PM: 0
SMRPG: 3 (Normal) 1 (Magic)
SPEED: Average in most games, a little bit above average in SM64.
INTELLIGENCE: They seem to be getting smarter, but their intelligence was very low in the earlier games.
SPECIAL/MAGIC ATTACKS: Parachuting, (SMW) Spitting thorns (SMRPG).
STRENGTHS: Goombas tend to appear in large groups, which gives them a small advantage.
WEAKNESSES: Goombas are pathetically weak. Super Mario World is the only game where they can't be beaten by every single attack Mario knows, and they have few useful attacks of their own. They're particularly weak against fire in Super Mario RPG.
ITEMS: SMW: Sometimes a coin.
SMRPG: Sometimes gives out MAX HP in battle.
SM64: 1 coin.
ML: Nothing.
POINTS: SMB: (1, 3 and LL): 100
SMW: 200 (stomp) 100 (cape) 1000 (chuck it at another enemy)
SMRPG: 1
PM: 2
ML: 2
BACKGROUND: The original story behind Little Goombas is that they were mushroom people who had defected to Bowser's army. This story has eroded through time, though. In fact, some Goombas now live peacefully with the people of the Mushroom Kingdom. Goombas come in a variety of forms, but can always be identified by their small, mushroom shaped bodies.
In general, Goombas form the backbone of the Koopa Troop. They can inhabit virtually any type of terrain, and they often appear in force. Sometimes they come equipped with parachutes, or flying in bubbles.
The best thing about Goombas is how they squish. When Mario stomps a Goomba, it flattens right down to the ground, and makes a little squeaky noise! This lead to the popular Mushroom Kingdom phrase, "It's like stomping Goombas in a barrel!" The phrase has become politically incorrect in many circles, though, since some Goombas have defected from the Koopa Troop and started living in peace with the Mushroom Kingdom's people. It's just not polite to talk about stomping your next door neighbour.
Super Mario Bros./Lost Levels Super Mario Land Super Mario Bros 3 Super Mario World Super Mario Land 2 Super Mario World 2: Yoshi's Island Super Mario RPG Super Mario 64
Paper Mario Super Mario Sunshine Mario & Luigi: Superstar Saga EVOLUTION: Goombas have changed a lot over the years. In the first Super Mario Bros game, they didn't have mouths, just eyes. This style remained in the first Gameboy title, Super Mario Land, mostly because of the character's tiny size. At about the same time, it was popular to draw them with a mouth and two little fangs...Voila! that's what they looked like in Super Mario Bros 3.
In Super Mario World, something very bad happened to Goombas. They couldn't be squished any more! Not only that, but they looked more like beach balls than mushrooms. True, you could now tip a Goomba on its back and boot the helpless little guy around, but it just wasn't as much fun as squishing them.
Thankfully, the people at Nintendo realized that Goombas without squishing just isn't right! Anyway, by Super Mario Land 2, the Goombas were back in shape, and as squashable as ever! As a matter of fact, the Goombas in SML2 were some of the most true-to-drawing ones in the whole series. The Super Mario RPG Goombas were pretty traditional looking.
The Goombas in Super Mario 64 weren't quite as mushroom shaped as their earlier counterparts, probably to save polygons. They still look quite good, as you can see in the picture above.
In Paper Mario, Goombas reached what I consider the pinnacle of Goombadom. They look exactly like the artwork in this game, as you can see above. Isle Delfino is home to strange Goomba-like creatures that are sometimes referred to as Strollin' Stus: they have large noses and red and white polka-dotted bottoms. They were erroneously added to the Goomba entry of the site but will eventually earn their own entry.
Mario & Luigi features more traditional Goombas with light skin and round heads, While Paper Mario: The Thousand Year Door features Goombas much like the original Paper Mario.
Why do these monsters keep changing? Maybe there are many different varieties of Goomba.