The transport layer is responsible for process-to-process delivery of data between two processes, typically using a client/server model. TCP provides a connection-oriented transport service with reliable in-order delivery, flow control, and error checking using sequence numbers, acknowledgments, and checksums. A TCP connection is established using a 3-way handshake and terminated using a 3-way handshake with FIN packets. UDP provides a simpler connectionless transport but does not guarantee delivery or prevent out-of-order packets.