Warning! When dealing with electrical wires, makes sure you always turn off the power before you do anything. There is no room for error since you can become severely injured in the process.
Anyways, if you're looking to change an old switch with a new one or a new type of switch, this tutorial will show you how. Check it out and remember to be safe and enjoy!