How each router makes the decision as to where to send a packet next is called code example
Example: how router makes descisopn
Destitnaion in routing table(Is the destintion there or not.)
Longest match.
AD Lowest wins.
Depends on the rotingprotocol metric(RIP - hops & OSTF - cost)