Using a layered model of networking (either OSI or TCP/IP) allows protocols to be mixed and matched. In a typical network transfer, the application data is encapsulated in a transport layer frame (either TCP or UDP) that facilitates multiple simultaneous network connections. This segment/datagram is further encapsulated in a network layer frame (normally IP) that coordinates routing, and is then wrapped in an Ethernet frame for transmission over the physical medium between two devices.
At each level, headers are added that track the two ends of the session (source and destination). The way that the source and destination are identified varies depending on the layer, in order to ultimately identify a single application on a single host to a single application/resource somewhere else in the network. When addresses are modified (on the device or in the header), this can...