← All articles
technologyhow does the internet workinternet basicscomputer networksAugust 13, 20268 min read

How Does the Internet Work? A Simple Guide

By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.

How does the internet work when a tap on your screen can bring back a page from a computer thousands of kilometres away? The answer is a chain of small steps involving networks, addresses, packets, routers, and servers. Once you follow one request from start to finish, the internet feels much less mysterious.

A network of networks

The internet is a network of networks. Your phone, laptop, or tablet first connects to a local network, often through Wi-Fi or a cable. That local network connects to an internet service provider, which connects onward to many other networks. No single machine contains or controls the whole internet. Instead, agreed technical rules let separate networks pass information to one another.

Every connected device needs a way to send data toward the right destination. Internet Protocol addresses, usually called IP addresses, help networks identify where packets should go. A website also has a human-friendly domain name. A system called DNS connects that name with the numerical address needed for routing, a little like looking up a contact name to find the number behind it.

When you ask how the internet works, it helps to imagine a postal system that can make routing decisions at many stops. Your request does not need to know the entire path in advance. Routers examine destination information and forward packets toward another network that can move them closer to where they belong.

Packets carry the information

Online information is usually broken into smaller units called packets. A large photo, webpage, or video does not have to travel as one giant block. Packets can move through the network, sometimes along different routes, then be put back into the correct order at the destination. This makes communication flexible when parts of a network are busy or unavailable.

Different protocols handle different jobs. TCP is one common protocol that can help check whether data arrived and place packets in the proper order. Other kinds of internet traffic may use different transport methods when speed matters more than perfect delivery. The important point is that the internet works because devices follow shared rules about how data is labelled, sent, checked, and understood.

If you are learning how the internet works, separate the idea of the internet from the web. The internet is the underlying network that moves data. The World Wide Web is one service that uses that network, alongside email, online games, messaging, file transfers, and many other services.

What happens when you open a website?

A simplified website visit looks like this:

  • •Your device connects to a local network and sends a request.
  • •DNS helps find the address linked to the domain name.
  • •Routers forward packets across several networks.
  • •A server receives the request and sends website data back.
  • •Your browser interprets the returned data and displays the page.

A useful way to picture the system is to separate physical connections from logical instructions. Cables, fibre links, radio signals, data centres, and routers provide paths for information, while protocols decide how that information should be packaged and interpreted. A video call and a webpage may use the same underlying infrastructure in different ways. This layered design lets engineers improve one part without rebuilding everything else. When you revisit how the internet works, ask which layer you are looking at: the physical path, the address and route, the transport of packets, or the application you actually see.

Most of the internet runs under the sea

It is easy to imagine data flying between continents by satellite, but the great majority of international internet traffic travels through fibre-optic cables laid across the ocean floor. Each cable is roughly as thick as a garden hose in deep water, with a few glass fibres at its centre surrounded by protective layers. Hundreds of these cables link the continents, and when a ship's anchor or an undersea landslide cuts one, traffic is rerouted along others, which is the packet-switching idea working on a global scale.

You can work out a speed limit for yourself. Light in glass fibre travels at about two-thirds of its speed in a vacuum, or roughly 200,000 kilometres per second. London and New York are about 5,500 kilometres apart, so a signal needs at least 28 milliseconds each way, and a round trip takes at least 55 milliseconds before any router or server has done anything. That delay, called latency, is why online games and video calls feel smoother with nearby servers, and why companies store copies of popular content close to users.

Watch the route for yourself

You can see routers at work with a tool built into most computers. On Windows, open a command prompt and type tracert followed by a website's name; on a Mac or Linux machine the command is traceroute. The output lists the routers your packets pass through on the way, often a dozen or more, with the time each one took to reply. The first hops are usually your home router and your provider's network. Some routers are set not to answer and show up only as asterisks, and the times jump wherever the route crosses a long distance.

The trick behind the tool is clever. Every packet carries a number called its time to live, and each router that forwards the packet reduces it by one. When the number reaches zero, the router discards the packet and sends a short error message back to the sender, which stops lost packets from circling the network forever. Traceroute deliberately sends packets with a time to live of one, then two, then three, and so on, so each router along the path in turn reveals itself by reporting the packet it had to throw away.

How networks agree on routes, and how that can fail

The internet is made of tens of thousands of independently run networks, such as internet providers, universities and large companies. Each is called an autonomous system, and each tells its neighbours which blocks of addresses it can reach using a protocol called BGP, the Border Gateway Protocol. Networks connect either by paying a larger provider to carry their traffic, known as transit, or by swapping traffic with each other directly, often free of charge, an arrangement called peering. Much of that swapping happens at internet exchange points, buildings where hundreds of networks plug into shared switches.

BGP works largely on trust, which makes mistakes contagious. In February 2008, Pakistan Telecom tried to block YouTube inside Pakistan by announcing a route for YouTube's addresses that led nowhere. The announcement leaked to other networks, which believed it, and YouTube became unreachable across much of the world for around two hours. In October 2021, a faulty maintenance command cut Facebook's data centres off from its backbone, its name servers then withdrew their routes, and its sites and apps vanished for about six hours. Engineers are gradually adding cryptographic checks so networks can verify who may announce which addresses.

The takeaway

The internet links many separate networks using shared addressing, routing, and communication rules. Data is divided into packets, routers move those packets toward their destination, and servers respond with the information your device requested. Keep the path in mind - device, network, routers, server, and back again - and everyday online actions become easier to understand.

Practise this

Questions from Networks and the Internet

Reading about something is not the same as being able to recall it. These are real questions from the Networks and the Internet unit in our Technology track, answers and explanations included. The unit has 120 in total across 23 steps.

  • Match the pairsLevel 2

    1. Match each part of a client-server exchange to its job.

    Answer: Client = Requests data; Server = Provides data; Web page = Sent to the client

    The client requests, the server provides, and the web page is delivered to the client.

  • Multiple choiceLevel 1

    2. What is the internet?

    • A giant network connecting computers around the worldcorrect
    • A single website
    • One big computer in one room
    • A type of phone charger

    The internet is a huge global network that connects computers all over the world.

  • Odd one outLevel 2

    3. Which one does NOT belong with the others as a device that joins a network?

    • A wooden chaircorrect
    • A laptop
    • A phone
    • A printer

    A wooden chair is not a device that joins a network, unlike a laptop, phone or printer.