There are five interactive switches in the game, all with different behaviors. They can be used to open and close doors, extend and retract pistons, toggle redstone torches, switch rails, or detonate TNT. Switches can also be linked to their target interactive object with the use of redstone wire.
The lever is a block in Minecraft which allows the player to flip a switch on/off. This can be used for many different Redstone machines, making it a vital block to use while using Redstone.
Buttons are similar to levers in that the player needs to right-click the switch to activate it. Instead of remaining in the "on" position when toggled, however, they revert to the off position after 1.0 seconds (stone) or 1.5 seconds (wooden). Buttons can only be placed on the sides of other blocks. Wooden buttons can also be activated by arrows.
 Pressure Plates
A pressure plate is similar to a stone button in the sense that it reverts to its "off" position once the player discontinues interaction. To toggle this switch, the player or another mob needs to stand on the plate. This will toggle the interactive object connected to the plate. Once the player or mob leaves the pressure plate, it switches back off after a short delay. Pressure plates can only be placed on the top of other blocks. Wooden pressure plates can also be set off by items, but stone ones cannot.
 Detector Rail
A detector rail is similar to a wooden pressure plate, but can only be triggered by minecarts. When any minecart goes over it, it sends power for as long as the minecart is on it.
 Tripwire Hook
Tripwire hooks are similar to pressure plates, however two hooks can be connected by string up to 40 blocks away and are activated when the player steps on (or through) the string, or when the string is broken unless broken with shears.
As of 1.4.2, buttons stay on for 1.2 seconds instead of 0.9.
There are two ways to connect a switch to the object which you want it to activate. First, you can attach the switch directly adjacent to the object. For instance, you could place a lever on a stone block touching a door. Toggling that switch will activate the door.
Second, you can connect the switch to the object using redstone wire as a type of wiring. By connecting the same stone block touching the door to another stone block with the redstone, you can essentially toggle the same door, but from further away.
Wooden and Stone Pressure Plates