From the Super Mario Wiki
Ads keep the MarioWiki independent and free :)
Spikes are harmful objects that can power down the Mario Bros., cause them to lose health, or even lose lives. These traps appeared in nearly all Mario games. Spikes tend to be stationary, retractable, or attached to a moving object. They are first introduced in Super Mario Bros. 2, though Icicles in Mario Bros. are functionally the same until they fall. In Super Mario Galaxy and Super Mario Galaxy 2, Mario or Luigi will run uncontrollably if they do come into contact with spikes.
In Super Mario World 2: Yoshi's Island, Yoshi's Island: Super Mario Advance 3, Yoshi's Island DS, Yoshi's New Island, and Yoshi's Woolly World, spikes are a lot more fatal than in the Super Mario series titles, as simply touching them will cause a Yoshi to lose a life instantly. A more common rough object, a thorn, also appears in the Yoshi's Island series.
In Super Mario Maker and Super Mario Maker for Nintendo 3DS, spikes also appear as objects, but go by the name of Spike Trap. Spike Traps can damage Mario if he touches them, and are classified as block objects. Depending on the game style and theme, Spike Traps can change appearance, most notably in the Super Mario Bros. 3 and Super Mario World game styles, where in the underwater theme, the Spike Trap will either change into a Jelectro, or a Sea Urchin from The Legend of Zelda: Link's Awakening. Additionally, shaking a Spike Trap in the New Super Mario Bros. U ground theme makes a train sound.
Spikes appear in Paper Mario: Color Splash. Spike pits appear in levels such as Mustard Café, The Golden Coliseum, and Fortune Island. 8-bit spikes appear in Green Energy Plant. In Kiwano Temple, many spikes that resemble Spiny Shells appear. Some must be crossed by rolling platforms, and others must be flipped over with a POW Block.
Spike Traps reappear in Super Mario Run, making their first appearance in the level Shell Me the Way! when collecting the Black Coins. They have the same appearance as the Spike Traps in the New Super Mario Bros. U style of Super Mario Maker.
Names in other languages