TCP connections are used for reliable, stream-based data transfer between systems. One system acts as a server, listening for incoming connections on a specified TCP port and accepting them. The other systems act as clients, connecting to the server on the specified TCP port.
After a connection has been established, data can be transferred in both directions while the TCP protocol helps to ensure that the packets will be delivered in order and that lost packets will be detected and re-sent accordingly.