the network layer
Imagine you mail a letter from Taipei to a friend in Berlin. You do not personally know the route. You just write a destination address on the envelope and drop it in a box, and a chain of post offices hands it along, each one looking at the address and deciding the next hop. The network layer is exactly this postal service for data: its one job is to get a chunk of data from a source host to a destination host that may be on a completely different network, across many machines in between.
Concretely, the network layer takes a piece of data from the transport layer, wraps it in a packet with a source and destination address, and hands it to the link layer to cross one link at a time. At each intermediate machine, called a router, the network layer reads the destination address and forwards the packet toward its goal. On the Internet, the network layer is built around one protocol, the Internet Protocol (IP), and it offers only a best-effort service: it tries to deliver each packet but makes no promise that packets arrive, arrive in order, or arrive undamaged.
It helps to see the boundaries. The link layer below it moves a frame across a single physical hop (one wire, one Wi-Fi cell). The transport layer above it (TCP or UDP) runs only at the two end hosts and adds things like reliability and port numbers. The network layer is the only layer that runs on every box in the path, including the routers in the middle, because it is the layer responsible for the cross-network journey itself.
Your laptop sends a packet to a web server: source 192.168.1.20, destination 142.250.71.78. Your home router, your ISP's routers, and finally the server's network each run the network layer, read that destination, and forward it one hop closer — none of them needs to understand the web page inside.
The same destination address guides the packet across many independent networks.
Best-effort means the network layer can drop, duplicate, delay, or reorder packets without warning. Any guarantee of reliable, in-order delivery is added on top by the transport layer (TCP), not by the network layer itself.