Ethernet and Wi-Fi only get data to the next device. To reach a computer on another network, maybe on the other side of the world, you need IP, the Internet Protocol, at layer 3.
Every host on the internet has an IP address. The common kind, IPv4, is 32 bits written as four numbers from 0 to 255 with dots between, like 203.0.113.7. The newer IPv6 is much longer. Unlike a MAC address, an IP address depends on where you are: your laptop gets a different one at home and at a café.
Part of an IP address says which network it's on, and the rest says which host on that network. That's what makes routing possible: a router doesn't need to know about every computer, only which way to send packets for each network.
A router joins networks together. When a packet arrives, it reads the destination IP address, looks it up in its routing table, and sends the packet on to the next router that's closer. Each step is called a hop. A packet across the world might take 15 or 20 hops, and two packets of the same download can take different routes.
Every IP packet also carries a TTL (time to live), a number that each router lowers by one. If it reaches zero the router drops the packet and sends back an error. That stops a packet going round in circles forever if routes are ever set up in a loop. IP itself makes no promises: packets can be lost, duplicated or arrive out of order. Fixing that is the next layer's job.
Practice
How many bits long is an IPv4 address?
More info
Quick reference
IP
Internet Protocol: addresses and routing (layer 3).
IPv4 address
32 bits: four numbers 0–255, like 203.0.113.7.
Router
Joins networks; sends each packet one hop closer.
Routing table
Which way to send packets for each network.
Hop
One router-to-router step.
TTL
Goes down by one per hop; at 0 the packet is dropped.