A dual-inline packaging1 (or DIP) switch is a tiny switch often built into circuit boards as a configuration tool. They can be found in a variety of electronic devices such as computers, arcade games, soda machines, slot machines and other coin-operated equipment2. DIP switches are always toggle switches with two possible positions - on (or 1) or off (or 0).
DIP switches are also used in computers for things such as changing the clock multiplier on motherboards. They can also be used to change front side bus (FSB) settings as a hardware alternative to the BIOS3. One of the early advantages of Macintosh computers over PCs is that circuit boards could be configured via software commands, rather than having to use DIP switches which require the computer to be shut down first (this feature didn't come to PCs until Microsoft developed the Plug and Play standard).
1. Previously, I said that "DIP" refers to the housing. It actually refers to "dual-inline packaging".
2. Thanks to TheBooBooKitty for that one.
3. Thanks to Zerotime for pointing that one out.