The 5 way switch may be the most versatile commonly used switch in guitars. The image shows 2 sets of connections, one with a red wire attached to the "common" post and the other with a green wire to the other "common" post.
Frame 1 illustrates the connection the switch makes to other poles on
Frame 2 shows why this switch is unusual. Position 2 of this switch
adds an additional contact to position 1, making it easy to combine 2 pickups
in this position. Advanced Topic: It
can also be used to make a connection between the first and second pole
without using the "common" pole.
Positions 3, 4, and 5 act in a predictable manner once you understand
positions 1 and 2.