The local switch (exchange) is directly connected to your telephone. This exchange connects local calls.
The toll switch (exchange) connects the local switch to the toll (long distance) transmission line when you make a toll call. The toll switch covering the local switch accommodating the other party's telephone connects the call passed by intervening toll switches (trunk exchanges) from your telephone.