Routing is the method by which network devices direct messages across networks to arrive at the correct destination. Routers use routing tables containing information about locally-connected networks and remote networks to determine the best path to send packets. The routing table includes details like the destination, mask, gateway, and cost for each route.