The transport layer, or layer 4, is responsible for transporting the data, either using a connectionless or connection-oriented protocol across the network. The encapsulation process starts at this layer. The data will have additional headers added as it traverses down the layers to become a frame, ready to be sent on the network.
The transport protocol selected will depend on the application. Data is transported primarily using either TCP or User Datagram Protocol (UDP). However, the transport layer has several other protocols. Let's take a look.