Routers determine the optimal path for forwarding network traffic between networks by using routing tables that are populated by routing protocols. Routing protocols allow routers to share information with each other about available routes and determine the best paths between sources and destinations across multiple networks. Common routing protocols include RIP, IGRP, OSPF, EIGRP, and BGP, with newer protocols like EIGRP offering faster convergence and operating efficiency.