socket and connect
If the server is the shop that opens its doors and waits, the client is the customer who walks across town and knocks. The client side of a TCP program is wonderfully short: make an endpoint, then reach out to a known address. Two calls do it - socket() to create the endpoint, connect() to dial the server.
In detail: socket() makes the endpoint and gives you a file descriptor, exactly as on the server. Then connect() takes that socket and the server's address (its IP and port) and initiates the connection - under the hood this performs the three-way handshake with the server. If it succeeds, connect() returns and your socket is now a connected socket: you can send() and recv() (or read() and write()) on it to exchange the byte stream. The client usually does not call bind(), because it does not care which local port it uses - the OS picks a free one automatically (an ephemeral port). It just needs to reach the server's well-known port.
Why it matters: this is the half of socket programming you use most, because most programs are clients - your browser, your email app, a script fetching an API are all clients calling connect() somewhere. The honest caveats: connect() can fail (no server listening, host unreachable, refused), so you must always check its return value; and connect() may block for a while during the handshake, which matters once you care about responsiveness and timeouts.
int s = socket(AF_INET, SOCK_STREAM, 0); if (connect(s, &server_addr, sizeof server_addr) < 0) { perror("connect"); exit(1); } /* now s is connected: send()/recv() */ Two calls, with a return-value check, and you are talking to the server.
The client just creates a socket and connect()s; the OS picks a local port for it.
connect() failing is normal, not exceptional - the server may be down or the port closed. Treat a failed connect() as an expected outcome to handle, never assume it succeeded.