Routers can be connected to your device over a network via a wired or wireless network. Switches are capable of connecting more than 15 devices to a network. For example, in an office, if you want to connect all the 15 plus computers to the same network, then you can use a switch to perform it. Usually, the router has four ports, out of which you can use 3 ports to connect your device and the remaining one to the switch.