In summary, computers communicate with each other over the Internet by:
- Using IP addresses to identify and route data packets
- Breaking data into small packets and adding headers with control information
- Sending packets to routers, which forward them to the next hop
- Using DNS to resolve domain names to IP addresses
- Reassembling packets at the destination computer
- Delivering data to the intended application or process
This is a simplified overview, and there are many more details and nuances involved in the process.