For a network router to know where to send packets of data it receives, it uses a routing table. The routing table contains a list of specific routing destinations. When the router receives a packet of data, it references the routing table to know where to send that data. The routing table may also contain information on how far each destination is from the router. In essence, a routing table is a map for the router.
A routing table does not contain a list of all possible destinations. Rather, it contains a list of destinations that are next in line to the router. Each router contains this list. When a packet is received, it's directed to the next network link (hop), as listed in the table, until it reaches its final destination. The routing table contains a list of IP addresses, Gateway addresses, and other information. Below, is an example of a very basic routing table.