Think of 4 terminals in a square pattern. A 4-way switch internally will connect either the top left terminal to the bottom right, or the bottom left to the top right. It's like one half of an X which flip-flops back and forth.
What's confusing to many people, in my opinion, is that 3-way and 4-way switches are misnamed. A 3-way switch is actually a 2-location switch (having 3 terminals, and 2 switching states), and a 4-way switch is actually a 3-or-more-location switch (having 4 terminals, and 2 switching states).
In a circuit, use the following rule:
Switched from 1 location = 1 2-way switch
Switched from 2 locations = 2 3-way switches
Switched from 3 locations = 2 3-way switches
1 4-way switch
Switched from 4 locations = 2 3-way switches
2 4-way switches
For n locations, where n >= 2, the number of 3-way switches is always 2, and the number of 4-way switches is always n - 2
Regards,
Brian