In a nutshell
TCP gives a reliable, ordered byte stream, so before any data moves both sides agree on starting sequence numbers. The client sends a SYN with its number, the server replies SYN-ACK (its own SYN plus an acknowledgement), and the client ACKs. This three-way handshake costs one round trip; closing takes a four-way FIN exchange.