All three boxes have ports and blinking lights, but they work at different layers and forward traffic for different reasons. A switch connects devices inside one LAN using MAC addresses, while a router joins different networks using IP addresses. If two computers in the same room cannot talk, think switch; if the office cannot reach the internet, think router. Hubs are mostly obsolete, yet interviews still ask about collision and broadcast domains for all three.