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

Lever
A lever is a binary switch with an "on" and "off" position. This switch can be toggled and left in either position, leaving the target object switched until the lever is toggled again. To toggle the switch, the player simply clicks the lever. Levers can be placed on the sides and top of blocks.

Button
A Button is similar to the lever in that the player needs to click the switch to activate it. Instead of remaining in the "on" position when toggled though, it reverts back to the off position after 0.9 seconds. Stone buttons can only be placed on the sides of other blocks.

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 other 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 18 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 3 switches are the basic/main switches of the game. In Beta 1.5, the Detector Rail was implemented for use with minecarts, and in snapshot 12w22a, the Tripwire Hook was added to the game for use with string.

Uses
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 (dust) as a type of wiring. By connecting the same stone block touching the door to another stone block with the redstone dust, you can essentially toggle the same door, but from further away.