! Switch
The ! Switch was first seen in Super Mario World. The switches come in four colors, Yellow, Green, Blue and Red. When activated, they make ! Blocks of the corresponding color whole (and, therefore, usable). They have the same purpose in Super Mario 64 and Super Mario World 2: Yoshi's Island.
They are later found in the Paper Mario series. This time, the switches only appear red or blue. Blue switches can only be used once, and normally open passages of some kind. Red switches can be used an unlimited amount of times, and are normally used for moving important object. However, the red ! Switches found in the Palace of Shadow in Paper Mario: The Thousand-Year Door are the only red ! Switches that can only be used once to move a wheel allowing Mario and his friends to get to the Shadow Queen's throne room and crypt.
In Paper Mario: The Thousand-Year Door and Mario & Luigi: Superstar Saga, there are also "simul-switches" (two must be hit at the same time) and "counted switches" (must be hit a certain number of times). There are also black and white ! Switches found in the Great Tree. Mario and company pushed the black switch to reveal four white ! Switches in the room where Mario found the blue key to free the other Punies. Mario had to hit the white ! Switches in this order: sun, moon, Puni and star to retrieve the Super Boots.