Every packet you send crosses a dozen or more routers, and each one makes its decision alone, in well under a microsecond, from a table it built by talking to its neighbors. This site is about both halves of that: the machinery inside a router that makes the decision fast, and the protocols between routers, and between whole networks, that decide what goes into the table.
It picks up where the routing chapters on networks.jelia.nyc stop. If routing tables, longest-prefix match or the words OSPF and BGP are new to you, read routing tables and dynamic routing there first, then come back.
Common mix-up: routing and forwarding are different jobs. Forwarding is the per-packet lookup, done in hardware millions of times a second. Routing is the slow conversation between routers that decides what the lookup table should say. A router can keep forwarding for a while even when its routing brain has crashed.