From the Super Mario Wiki
A Grinder is a spinning metal saw blade that acts as an obstacle in several Mario games.
Super Mario series
Super Mario World
Grinders are found in some Fortresses and Castles in Super Mario World. In this game, there are two types of Grinders: line-guided and non-line-guided. The line-guided variety travels along a dotted line while non-line-guided Grinders travel across the floor. The blades are rather large and cannot be jumped on, although they can be defeated by a Slope Slide (which displays a glitchy sprite). Mario or Luigi can also Spin Jump onto a Grinder, which lets them bounce off it without taking any damage.
Super Mario Galaxy 2
In Super Mario Galaxy 2, Grinders appear in the Puzzle Plank Galaxy and the Rolling Masterpiece Galaxy, where they cut through planks of wood and cause them to fall. When Mario traverses certain parts of a planet or comes close to a Grinder, it starts moving and any enemy that touches it is defeated.
Super Mario 3D Land
New Super Mario Bros. 2
Grinders appear in New Super Mario Bros. 2, where they operate on rails as they did in Super Mario World. They can also jump vertically, if the rail allows them to. They are among the few obstacles in the game that cannot be destroyed by Gold Mario's fireballs. There are also larger versions that appear in the game.
Grinders reappear in Yoshi's Story. They are found abundantly in Mecha Castle and Lift Castle, and reappear in Magma Castle in tight spaces. Some Grinders are permanently connected to walls and need to be jumped or crawled past.
Paper Mario: Sticker Star
Super Smash Bros. for Nintendo 3DS / Wii U
Super Mario Maker
Grinders reappear in Super Mario Maker. Their appearance is larger and different than that of previous titles. Because Grinders didn't appear in Super Mario Bros. and Super Mario Bros. 3, new sprites were made for those styles, and the New Super Mario Bros. 2 model is reused for the New Super Mario Bros. U style. They also cannot be Spin Jumped on safely (except with Yoshi) and are invincible. The version 1.30 update allows the player to shake the Grinder, turning it into a Bumper. The Bumper will simply cause Mario to bounce off it, and nothing else.
Mario & Luigi: Paper Jam
Names in other languages