Internet introduced the concept of a network of heterogenous packet switched networks connected by gateways. The networks did not know they were part of the Internet. The networks were interconnected by specialized computers called gateways. The hosts on each network knew they were part of the Internet and knew how to send and receive Internet packets.
The gateways knew they were part of the Internet and they routed Internet packets from gateway to gateway across multiple networks until they arrived at the destination network at which point they were relayed to the destination host on the destination network.
infographic by: www.ssl2buy.com