Router
Image: George Shuklin, CC BY 2.5, Wikimedia Commons
Photo: Compare Fibre on Unsplash
In short: A device that forwards data packets between different networks based on IP addresses — e.g. between the home network and the internet.
In more detail: While a switch switches within a network, a router works at layer 3 of the OSI model and uses routing tables to decide by which path a packet reaches its destination in another network. Home routers usually also take on tasks such as DHCP and acting as a Wi-Fi access point.
In Depth
Routers make their forwarding decision based on a routing table, which specifies for every known target network via which next “hop” (the next router along the way) a packet has to be sent. This table can be static (entered manually) or dynamic — with dynamic routing, routers automatically exchange information about reachable networks via special protocols (e.g. OSPF, or BGP in the internet backbone), so that the table adapts itself when there are failures or new connections.
A home router is actually a bundle of several functions in one device: router (switching between the home network and the internet), switch (switching between its own LAN ports), Wi-Fi access point (radio connection), DHCP server (automatic IP assignment) and usually a firewall/NAT function that hides the internal network behind a single public IP address to the outside. In the professional data centre environment, on the other hand, these functions are often split across separate, specialised devices.
See also: Switch, IP addresses