This image shows how the flow goes for a HTTP request (TCP)
We start with the client, and once it reaches the session layer, and sees, oh we need to create a session, it keeps the serialized data, does a 3 way handshake first with SYN and ACK, and once the connection is established, the data is sent.
Your client isn't connected to the server directly right? There's switches, routers, load balancers, proxies, VPNs, CDNs and many more things in between. Then what? What happens there?
Those things look into your data. Not literally but yes. For example:
Switches look till the layer 2 (Data Link for the MAC addresses) to see which network to send to.
Wireshark (in raw capture mode) can capture Ethernet frames before IP decoding
Routers look till the layer 3 (Network) to see which IP to 'route' the data to.
Cisco IOS / Juniper Junos routers – route IP packets via OSPF, BGP, etc.
Firewalls look till the transport layer to see which IPs & ports to send the data to and which to block. (ISP uses this method to block certain websites)
Load balancers/CDNs look till layer 7 (Application) to cache data/ or the data is sent to a different server based on the /xyz/abc path.
VPNs are essentially a layer 3 (Network) tunneling mechanism, encapsulating your packets to provide privacy and security over public networks. (esssentially they put our packets and put them in a different IP packet and send it to the destination IP)