This model illustrates the typical wiring of light switches in your home (excluding neutral and ground wires). EveryCircuit doesn't yet provide a Double-Pole Double-Throw (DPDT) (i.e. 4-way) switch -- which would significantly simplify the diagram. The top circuit uses 2 relays, a voltage source (IO), and ground to simulate each DPDT switch.
The 4-way switches are required to wire more than 2 wall switches into any residential wiring circuit. They allow any one of the wall switches to change the state of the circuit.
Both circuits are essentially the same except each "DPDT switch" in the bottom diagram uses a pair of Single-Pole Double-Throw (SPDT) switches that must both be moved manually.
The switches on either end are normal SPDT (i.e. 3-way) switches you would find in your home.