Basic 2 way circuit power coming in at switch. After you have pulled your switch out from the wall the wires in the box and connecting to the switch should look like one of the following.

How To Wire Switches
3 way wall switch wiring diagram. With a pair of 3 way switches either can make or break the connection that completes the circuit to the light. Most common is the single pole switch the type used to control a light fixture from a single locationthe next most common is the three way switch which is commonly used to control a light fixture from two different locations. The black line wire connects to the common terminal of the first 3 way switch. Step 3 confirm that each gang box contains a neutral wire typically white. In the 1st diagram below a 2 wire nm cable supplies power from the panel to the first switch box. Wiring a 3 way light switch.
3 way switch wiring diagram with line and load in the same switch box. Wiring a 3 way light switch is certainly more complicated than that of the more common single pole switch but you can figure it out if you follow our 3 way switch wiring diagram. Power through switch light is controlled by two three way switches with the light between the switches and the power first going through a switch then to the light and onto the second three way switch. 3 way switch wiring with light first. Typical 3 way switch wiring nm cable. So now that you have a basic concept of wiring a 2 way switch lets look at the following 2 way switch diagrams to see which type of circuit scenario you have.
In the above diagram the white wire must be re identified as a hot wire at each switch location. Wall switch according to the diagram. 4 way switch wiring with light first. Pick the diagram that is most like the scenario you are in and see if you can wire your switch. Wall switches used to control ceiling light fixtures or other fixtures come in three types. Traveler wires are interchangeable.
Ensure all wire nuts are securely fastened. The ground wire is pigtailed with a wire connector at the switch boxes and the ceiling box. Fixture between two three way switches. In this diagram the source for the circuit is at the light fixture and the two switches come after. Two wire cable is run from the light to sw1 and 3 wire cable runs between the three switches. 3 way switch wiring diagram.
This diagram illustrates wiring for a 4 way circuit with the electrical source at the light fixture and the switches coming after. The white wire between switches is not being used as a neutral. A 3 wire nm connects the traveler terminals of the first and second 3 way switch together. Take a closer look at a 3 way switch wiring diagram. Take a photo of the existing wiring for future reference. With these diagrams below it will take the guess work out of wiring.
The wireless setup is a two step process for a 3 way switch. Two wire cable runs from the light to sw1 and 3 wire cable runs between sw1 and sw2. An example of three way switch wiring with the line and load in the same 4 square electrical box. For example a long hallway or stairway might use a pair of three way. This might seem intimidating but it does not have to be.