Routers and switches are two network components that connect computers locally and remotely. Routers and switches have several similarities, but they are used differently. The purpose of a router is to let you connect multiple devices to a single internet connection and create a local area network (LAN) at the same time, while switches only connect devices locally.
Hub, Switch and Router Explained – What's the Difference?
In a typical home network setup, you might connect multiple computers and other devices to a switch, connect the switch to a router, and connect the router to a modem using the router's Wide Area Network (WAN) port.
Small home networks can function without a switch by connecting devices directly to the router's LAN ports and Wi-Fi, while business and school networks often have multiple switches.
Routers connect local devices to each other and the Internet, while switches only connect devices locally. Switches can also be connected to routers, allowing many devices to connect to a router over a wired connection, even if a router only has a single Ethernet LAN port.