A router connects two or more networks and routes packets between them using routing tables. It uses routing algorithms like distance vector or link state to dynamically determine the best paths. As a specialized computer, a router operates at the network layer and can function as a DHCP server, default gateway, and move data between networks through both hardware and software functionality.