Using the network portion of a destination address instead of the complete host address makes routing efficient and keeps routing tables small. More important, it helps hide information, keeping the details of specific hosts confined to the local environment in which those hosts operate. Typically, a routing table contains pairs (N, R), where N is the IP address of a destination network, and R is the IP address of the "next" router along the path to network N. Router R is called the next hop, and the idea of using a routing table to store a next hop for each destination is called next-hop routing. Thus, the routing table in a router R only specifies one step along the path from R to a destination network - the router does not know the complete path to a destination.
It is important to understand that each entry in a routing table points to a router that can be reached across a single network. That is, all routers listed in machine M's routing table must lie on networks to which M connects directly. When a datagram is ready to leave M, IP software locates the destination IP address and extracts the network portion. M then uses the network portion to make a routing decision, selecting a router that can be reached directly.
In practice, we apply the principle of infomlation hiding to hosts as well. We insist that although hosts have IP routing tables, they must keep minimal information in their tables. The idea is to force hosts to rely on routers for most routing.