To get reliability use a positive acknowledgement with timeout scheme. When send something over a TCP connection, expect to get an ACK back in a fixed amount of time. If don't get the ACK, assume data was lost and retransmit. TCP optimizes communication by using a sliding window. Instead of sending one IP packet and waiting for the ACK, it can have multiple outstanding unACKed packets.
Basic idea is to fill the network pipe between sender and receiver with data.
Keep a steady state with sender always sending and receiver always ACKing. TCP also has port abstraction - a TCP connection goes between two ports. To set up a TCP connection, use a three-way handshake. Initiator sends a request, receiver sends an ACK, then sender sends back an ACK to establish connection. Can close a TCP connection.