Need to replace a switch that controls a light from two locations? Well, that type of switch is called a three-way switch as opposed to a single-pole switch which controls a light from a single location.
Three-way switches must be used in pairs and have three screw terminals. A black "hot" wire is attached to the darkest screw terminal marked "COM" for "common." The other two terminals are used to wire up what are called "travelers" or leads for the switch.
The trick in replacing a old three-way switch is to mark the COM or common wire off the old three way switch before you replace the old switch.