Encapsulation refers to the process of adding several layers of protocol headers to data segments prior to network transmission. With respect to layered network architecture, the encapsulation process works from the top down. For example, an application payload such as HTTP will be encapsulated by a transport layer header such as TCP. This in turn will be encapsulated by a network layer header such as IP. Finally, the network layer packet will be encapsulated by a data link framing protocol such as Ethernet.
On the receiving end, an opposite process - called deencapsulation - takes place. Under deencapsulation, each header will be stripped off, starting with the layer two header, working up the stack until only application data is left. This deencapsulated application data is then consumed by a process listening on an open port, completing the network transmission.