Fred,
Most switches have enough slack in the wires to allow you to remove the mounting screws and pull the switch out far enough to unplug the wires and transfer them to the new switch. If there are multiple wires to a switch, sometimes you will need to use retainers to hold the wires that are unplugged to prevent them from retracting into the wall and to identify which terminal they mate to. Also, remember to turn off the power to prevent a short to ground when preforming the installation.
Gerald