Before any data is sent, the client and server establish a connection in three steps: the client sends a SYN packet, the server replies with SYN-ACK, and the client confirms with an ACK. After that the channel is ready. TCP numbers the bytes, acknowledges receipt and retransmits lost packets, guaranteeing that data arrives complete and in the right order.
TCP is not the only transport; the choice depends on the task:
Understanding TCP helps make sense of how the browser and servers exchange data over the network.