A switch will change how electricity flows through the switch.
Sparkfun has a great tutorial on switches if you want to know more about them.