The Goomba is a member of Bowser's army and a weak one at that. Goombas can be killed with just 1 hit, in most games, usually by jumping. There are many different versions of the Goomba such as the flying ParaGoombas, Giant Goombas, Spiked Goombas, and Tanooki Goombas (they don Mario's famous Raccoon appearence). A different species of Goomba, the Galoomba, was introduced in Super Mario World. Goomba's are frequent enemy's of Mario and Luigi who frequently stomp on them.
In Paper Mario, there is a Goomba King which is said to be the leader of the Goombas. Similarly, in Super Mario 64 DS, there is a boss known as the Goomboss. This implies that either, not all Goombas are part of Bowser's army, or that Bowser's army contains giant boss-like Goombas.
In the Paper Mario series, some Goombas serve the roles of partners and citizens. This must mean that either, Goombas are just wild critters roaming around the Mushroom Kingdom that don't become evil until Bowser recruits them or that some Goombas escape Bowser's clutches and become good (or at least neutral). It is also possible that the good Goombas come from some sort of mixture of the 2 theories.
Even though they are the most basic enemies in the game, Goombas were the last to be added to Super Mario Bros. When the developers were told by testers that Koopas were a little too challenging to be the first enemies faced, they wanted to make some simpler foes, and the Goombas were born. However, to implement them, the programmers had to overcome a big problem: being so late in the design process, there was almost no room for extra data for new sprites in the almost complete levels. This was cleverly overcome by there only being one Goomba image; instead of animating 2 or more different sprites, the one was drawn with one foot forward and just flipped horizontally, creating the appearance of walking.
What are they?
Even since their first appearance in Super Mario Bros., there has been debate as to exactly what Goombas are, or at least what they are supposed to look like. This stems from perceived differences in the Japanese and English descriptions of them.
In the American SMB instruction booklet, they are described as "Little Goomba: A mushroom who betrayed the Mushroom Kingdom". While their name in Japanese has always been "Kuribo" which translates as "Little Chestnut". Their cartoony appearance never resembled one or the other closely enough to convince either side of the argument.
The controversy was somewhat put to rest when, in an interview , assistant director of Super Mario Bros. Takashi Tezuka decisively said, "It's a shiitake mushroom!".
This linguistic confusion was even commented on by Nintendo developers. In the 7th course of world 9 in New Super Mario Bros. Wii, there are chestnut shells that Goombas pop out of when hit by fireballs. Although most likely a joke on Nintendo's side, this has served to reignite the debate with some fans.