Here's a Schematic drawing of a 4 Way Switch, which can be used as a visual aid to reference Virgil's explanation above.
He has posted avery nice description of the 4 way switch's function and internal circuitry [good job, Virgil!].
Schematic - 4waydtl1.gif: 4 way toggle switch internal circuitry detail...
If you view the two sections [the "A" part and the "B" part] as two separate "3-way switches", connected together at the handles so they both toggle together, the circuitry becomes a little more simpler to grasp.
Point "Ax" and "Bx" are connections to travelers - "Ax" being one traveler, "Bx" the other. For this example, refer to "Ax" / "Bx" as the Incoming travelers [from the "Hot" 3 way switch].
Point "Ay" and "By" are the output connections to the travelers, which will run to the other 3 way switch [at the "load" end of the loop].
If more than one 4 way switch is used in the switch loop, then the "y" output points will run to the "x" input points on the next 4 way switch [and vice verse].
There's no limit to how many 4 way switches can be in a loop - as long as they are set between the 3 way switches - with the 3 ways on the "Ends" of the loop.
There must be two - and only two 3 way switches within any normal switch loop of this type, with the exception of special / custom type circuits. Those type are beyond the scope of this thread, so I will not include their criteria.
If a standard type 3 way dimmer is used in the loop, just swap one 3 way switch for the dimmer.
Hope this is helpful!