Switches

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.

Lever
A lever is a switch which has "on" and "off" positions and stays in one position except when toggled by a player by right-clicking. Levers can be placed on any face of a block.

Button
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.

History
The first switches to be implemented were the lever, button, and pressure plates in Alpha 1.0.1 - these three switches are the basic/main switches of the game.

In Beta 1.5, the Detector Rail was implemented for use with minecarts.

In 1.3.1, the Tripwire Hook was added to the game for use with tripwire.

As of 1.4.2, buttons stay on for 1.2 seconds instead of 0.9.

Usage
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.