Before any application data flows, the client and server run a handshake. The client sends a ClientHello listing the TLS versions and cipher suites it supports plus a random number. The server replies with its choice of cipher, its own random number, and its certificate chain.
The client verifies the certificate against the CA trust store built into the operating system or browser. It checks the signature, the expiry date, and that the hostname matches. If anything is wrong you get the familiar red warning page. Both sides then run a key exchange, almost always Elliptic Curve Diffie-Hellman, to agree on a shared secret without ever sending that secret over the network.
From the shared secret they derive symmetric session keys, typically for AES-GCM or ChaCha20-Poly1305. Asymmetric crypto is slow, so it is used only to bootstrap the handshake; the bulk traffic is encrypted with fast symmetric keys. TLS 1.2 needs two network round trips for this. TLS 1.3 trimmed the handshake to a single round trip, and with session resumption it supports 0-RTT, where the client can send data in its very first message.