Multiplexing/demultiplexing enables the lower levels of the TCP/IP stack to process data without regard to which application initiated that data.
All associations with the originating application are settled at the Transport layer, and data passes to and from the Internet layer in a single, application-independent pipeline.
The key to multiplexing and demultiplexing is the socket address. Because the socket address combines the IP number with the port number, it provides a unique identifier for a specific application on a specific machine.