This is the basic circuit for a three-way switch. The gray circle represents a light bulb controlled by the two switches. It is gray because it is "off." The two lines ending near the left side of the drawing go to a power source, like the circuit breaker panel in your house.
The green rectangles represent the switches. Notice that one conductor comes into each switch, but two go out. When the toggle is thrown the pathway inside the switch shifts from one of the out conductors to the other.
Here you can see that electricity can flow along the upper wire through the first switch, but its pathway is broken at the second switch and the light remains "off."