Every computer on the Internet has at least one address, usually represented as four numbers between 0 and 255 inclusive. Some numbers have special meanings; for instance, 127.0.0.1 always refers to the computer itself. Also, some addresses are private: anything matching 10.* or 192.168.*, for instance, is a private address, and somewhere between that computer and the Internet at large is a computer that uses its own address and translates between its public address and that computer’s private address. Every computer also has ports. These are just numbers between 0 and 65,535, and they have no inherent meaning, except that certain ports have customary meanings.
There is a system in place to translate the address numbers into human-readable names. So you can translate www.fluther.com into 67.207.146.191. This is useful, because humans are very good at remembering meaningful words, but not so good at remembering arbitrary numbers.
So computers can listen on those ports I mentioned above. The computer with address 67.207.146.191 can listen on port 80, which is the customary web port. So when I type “www.fluther.com” into my browser address bar, the computer sees if it can make sense of it. It looks like www.fluther.com is a domain name, so it tries to turn it into a numeric address, and succeeds. Then it opens a connection to port 80 on that computer, and sends a web request. The Fluther computer responds with a web response, and I see a web page.
Now, I’ve left out a big thing here—how the information gets from here to there. There are two types of Internet transmissions. One is continuous, for streams of data and interactive sessions, and the other is for small bursts of data. The former is called TCP, and the latter is called UDP. Those stand for something, but it’s not helpful to explain them. Because a web connection requires a request and a response, it’s established with TCP. But an online first-person shooter game is sending a lot of “I just moved to these coordinates” messages and “I just shot my gun” messages, and receiving a lot of “the bogey just moved to these coordinates” messages, which are much better sent in small packets, so it uses UDP.
So you’re playing that first-person shooter. The computer assembles a packet of data, saying “I just moved to these coordinates.” It puts an address on it—one of those address numbers—and a port. It then sends it out on the network connection. It gets to your ISP, and the computers there look at the address. Each of those computers has many connections coming in and going out, and so they look at the address number and route it to the right outgoing connection. The computer there does the same thing. Eventually the packet of data passes through 20+ computers and gets to the computer it’s going to. Or it doesn’t, but that’s one of the risks you take when you use UDP.
Now, TCP works the same way, except that it’s not just for single small bundles of data. So the message can be split into smaller packets of data, and each packet has a sequence number. So they get sent off, and then the receiving computer looks at the sequence numbers to reconstruct the message. If a packet goes missing, the receiving computer can send a message back saying “I’m missing packet 42!” and the originating computer can replace it.
Now, that whole thing explains the network. Remember when I used the web browser as an example? The Internet is the system that handles mapping names to numbers, and routing packets all over the place, but things like web browsers and online games are protocols that are built on top of the Internet.