From the Super Mario Wiki
Skewers (also known as Spikes and Spike Pillars) are grey, blue, black or green pillars with spikes on them. First appearing in Super Mario World, they can either power-down Mario or crush him for an instant life loss. In later titles, however, the Skewers can only power-down Mario.
Super Mario series
Super Mario World
Originally appearing as light grey stone pillars in fortresses and castles, the Skewers are all vertical in Super Mario World, moving up and down blocking the path. There are usually several of them in a row which have to be timed. They appear as obstacle alongside Grinders in #6 Wendy's Castle in the first room, the Valley Fortress as the main traps of this level (moving faster in the final section), and Bowser's Castle in door number 5. Unlike Wendy's Castle and Valley Fortress, the Skewers in Bowser's Castle comes down slowly but still cause an instant loss if the player is hit by them. There are also some yellow miniature ones without spikes (resembling pencils) in Chocolate Fortress and #7 Larry's Castle.
New Super Mario Bros.
New Super Mario Bros. Wii
Skewers, referred to as pistons in the Prima game guide, make a comeback in New Super Mario Bros. Wii (now black with gold spikes), the latter of which also features a very long and extremely fast piston that runs along the floor for the length of a long room in World 4-, and very large vertical ones in World 6- and World 7-. The sound they make is that of a large sliding gate slamming.
Super Mario 3D Land
Skewers from New Super Mario Bros. Wii make a return in the Nintendo 3DS game, Super Mario 3D Land, marking their first appearance in a 3D Mario game; they are no longer in castles, instead appearing on airships. They cannot be destroyed, even while invincible; as Statue Mario or Invincible Mario (including White Tanooki Mario), they are like walls if run into with these powers.
New Super Mario Bros. 2
In New Super Mario Bros. 2, Skewers make a reappearance. However, unlike past New Super Mario Bros. installments, they are blue, and they appear only in one course, World 3-, which is water-filled course, and only horizontal Skewers are featured.
New Super Mario Bros. U
Skewers also appear in New Super Mario Bros. U, where they are found only in Giant Skewer Tower. All of the Skewers are horizontal and are once again black with gold spikes as in New Super Mario Bros. Wii, and their lengths vary. The Skewers also appear in the New Super Luigi U course, Shish-Kebab Tower, but they move at faster rates than in New Super Mario Bros. U.
Super Mario Maker
Skewers return in Super Mario Maker as an addition in a software update that was released on March 9, 2016. They function identically to their previous iterations, activating every few seconds, but with some differences. Their tips have been flattened, they come with a base that they shoot out of, and have a maximum length of 13 blocks long, plus the base, unless they hit terrain.
They can also be added to any of the four game styles, including the original Super Mario Bros. and Super Mario Bros. 3, where they had never appeared before. In these 8-bit adaptations, they are largely black, with some gray scaling on the edges, and spikes; the points are white, with the sides of the spike as gray. There is a little bit more detail on the Super Mario Bros. 3 version.
Skewers can be used by shaking the Thwomps; however, they can't be enlarged with Super Mushrooms. In Super Mario Maker for Nintendo 3DS, Skewers are standalone course elements and are no longer created by shaking a Thwomp.
Super Mario World television series
Mario Party series
Mario Party: Island Tour
Mario Party 10
Wario Land: Shake It!
In Wario Land: Shake It!, Skewers are featured only in underwater levels. If Wario inside his Subwarine comes in contact with these, the Subwarine will take damage reducing Wario's heart health to half.
Donkey Kong Country Returns
Super Smash Bros. for Nintendo 3DS
Skewers from Super Mario 3D Land also appear in the stage based on the game, 3D Land, in Super Smash Bros. for Nintendo 3DS, where they rise from the water and can destroy part of the stage's platforms (which resemble Switchboards from Super Mario 3D Land), as well as hit any players who touch them.
Mario & Luigi: Paper Jam
Names in other languages