A router forwards data packets between separate computer networks.
Routers examine destination network information in packet headers and use routing tables to choose where packets should go next. A home router commonly connects a private local network to an internet service provider, while large routers can move traffic between major network operators.
Many home devices combine several functions in one box, including a router, Ethernet switch, Wi-Fi access point, firewall, and sometimes a modem. Those functions are related but not identical. An access point provides wireless connectivity; routing determines how traffic moves between networks.
Routers primarily operate at Layer 3, the network layer, of the OSI model. Switches generally forward frames within a local network using hardware addresses, whereas routers make decisions using network-layer addresses such as IP addresses.