A DPDT (Double Pole Double Throw) switch allows two completely separate circuits to be controlled by just one switch. They can be used as on/off or on/on switches.
There are many situations on a model railway layout where a DPDT switch can be useful. They can be used to facilitate the single-switch operation of two pieces of equipment that require different power supplies, for example, AC or DC, direct current between different tracks, change the polarity of a circuit on a reverse loop or even used to operate more than one signal light with a single switch. DPDT switches are a great solution for any circumstances where you need to operate multiple components with either a single or dual power supply or need to reverse the polarity of a circuit.
The advantage of a DPDT is that it simplifies numerous circuits that would otherwise require several switches therefore cutting down on wiring, switches and the number of steps required to carry out a particular function. The disadvantage is that without at least a very basic knowledge of wiring, they can be a little tricky to install correctly.
Don't be put off though, there is plenty of advice out there, experienced modellers are usually willing to share their knowledge and there's always your local model shop who are happy to help.