From the Super Mario Wiki
“Ouch, that was cold.”
Spiked Goombas (also known as Spiky Goombas, and referred to as "Spiny Goombas" by Professor Frankly) are Goombas that have thought of a creative way to avoid being squished by Mario. They wear green helmets similar to Spike Top shells to prevent Jump moves from damaging them, covering the common Goomba's weakness. They are tougher than regular Goombas and Paragoombas making the Spiky Goomba the strongest of the Goomba family tree. While their helmets are a great defense against jumps, they're still defenseless against most other attacks. Mario's Hammer or Bowser's fire breath are two good examples. Spiked Goombas are a staple of the Paper Mario series, being one of two variants of the normal Goomba; they have appeared in all three games. A similar Goomba appears in Mario Party 7 in a shop in Bowser's Enchanted Inferno!.
Spiked Goombas, as they were called in this game, made their debut appearance here. They are first seen in Goomba Road, but also appear in many different locations, such as Pleasant Path. A single Spiked Goomba also appears at Bowser's Castle, and was in charge of guarding the items in the storage room. However, instead of guarding them, he decided to sell them to Mario and company as if the storage room was an item shop.
Like all Goomba's A Spiked Goomba attacks by headbonking. Also if Mario takes damage from the Spiked Goomba's headbonk attack or if Mario jumps on a Spiked Goomba, the Spiked Goomba will laugh.
A Spiked Goomba can also be found inside a Brick block near a Goomba.
In Paper Mario's sequel, Spiked Goombas reappear as common enemies, but they are referred as Spiky Goombas in this game. It also appears as the first spiked enemy in the game. If Mario or a partner jumps on it, they will take damage. Their most known appearance is at the beginning of the game, where one battles with a normal Goomba and a Para-Goomba in the Rogueport Sewers. Once Mario gets the Spike Shield badge, Mario will be able to jump the Spiky Goombas along with all spiked enemies.
In Super Paper Mario, Spiked Goombas once again appear. They, as always, cannot be stomped by normal means. However, they can be defeated by using a Pixl, such as Boomer, Carrie, Barry, or Cudge. Bowser's fire breath attack can also toast them. They appear in the Flipside Pit of 100 Trials in rooms 12 and 38.
The spiky helmets they use (Or possible green spike top shells) appeared as an item in Paper Mario: Sticker Star for the Nintendo 3DS, though the enemies make an absence in this game.
Paper Mario and Super Paper Mario Stats
Names in other languages