Switches operate at layer 2 of the OSI model and forward traffic based on MAC addresses within a broadcast domain. Routers operate at layer 3, forward traffic based on IP addresses, and can route traffic between broadcast domains. Switches can be overwhelmed by broadcast storms but routers block broadcasts to different networks. The relationship between switches and routers is analogous to local and long-distance phone calls, with routers functioning like higher-level switches to route traffic between networks.