A single-pole switch has two brass screw terminals. Both are hot leads for one incoming and one outgoing line. Those are all the wires that connect to the switch.
The neutral wires tie together separately and the ground wires tie together separately in the box.
Many new switches include a ground screw; others may not have one. If you have the choice, get a switch with a ground screw terminal. That's where the bare copper or green wire connects.
When a switch is at the end of a circuit (one incoming cable), the neutral also becomes a hot lead and connects to a terminal. This type of wiring scheme is often called a switch loop.
NOTE: Install the switch so flipping it UP turns the light ON. This is very important if using a silent, "mercury" switch, because they won't operate properly unless they're installed correctly.
Three-way switches can control one light from two different places. Like switches that operate a light from both the top and bottom of a staircase.
A three-way switch has three screws. One screw is colored darker than the other two. It's called the "Common" terminal. The other two screws are called "Traveler" terminals.
You can wire two three-way switches and a light in a few different ways. It all depends where the light is located: before, between or after the switches.
What we describe is not how all three-way switches are wired. But the following will give you an idea of how they're connected.
For simplicity, let's say the light is after both switches. The first box has two cables: one 14-2 incoming from a power source, and one 14-3 outbound to the second box.
The second box has that incoming 14-3 cable and an outbound 14-2 cable to the light.
In each box, twist all the ground wires together (add a pigtail in each metal box). Screw on a wire connector (and fasten the pigtail to the back of the metal box).
Connect the two neutral leads in each box with wire connectors.
In the first box, connect the incoming (14-2) hot lead to the switch's "Common" terminal. Connect the outbound (14-3) leads to the two "Traveler" screws. In this case, the traveler leads can be hooked to either terminal.
In the second box, hook up the incoming (14-3) hot leads to the switch's travelers screws.
Finally, hook up the outbound (14-2) hot lead going to the light to the "Common" screw. That completes wiring the switches. Complete the circuit by hooking up the light to the neutral, hot and ground leads.