What is a DPDT Switch ?
A switch is a device that breaks an electrical circuit.
The word DPDT stands for DUAL POLE DUAL THROW. These switches are very common switches used to make manual robots where you need to reverse your motors apart from running them in the forward direction. Dual Pole means the switch has two input terminals for both the positive and the negative terminals of the battery and the main circuit, and Dual throw represents the switch having two states.
The switch in your house is a SPDT switch since only one wire (positive/live wire) enters and leaves the switch and the switch has two states : ON and OFF. The six terminals shown below in the diagram are the teeths of the DPDT switch.
Below you can see the working of a DPDT switch in both the directions (using it in a single circuit and reversing the direction of current according to the throw of the switch) i.e. Forward as well as Backward. When the switch is not pressed in any direction intially none of the switches are interconnected; when the switch is pressed in the upward direction, the middle teeths and the upward teeths get connected, and vice versa happens when the switch is pressed in the downward direction.
Now if you want to go ahead and use the switch for driving a motor in both directions, then you have to use the middle two teeths of the DPDT as the terminals of the motor and short circuit the extreme teeths teeths diagonally. Below shown is the connection of a DPDT for driving a single motor in forward and backward direction.