Science and Coding Basics

How the Internet Works in Simple Terms

A conceptual tour of the internet: addresses, domain names, packets, routers and servers, and what happens in the moments after you open a web page.

On this page
  1. A network of networks
  2. Addresses: how devices find each other
  3. Packets: breaking messages into pieces
  4. Routers: the sorting offices
  5. Servers and clients
  6. What happens when you open a web page
  7. Security and privacy in outline
  8. Why this matters for learners

A network of networks

The internet is a very large collection of computer networks that agree to exchange data using shared rules. Your home network connects to your provider’s network, which connects to others, and so on, through cables, radio links and equipment owned by many different organizations. No single computer or company runs the whole thing.

The shared rules are called protocols. A protocol is simply an agreement about how to format and send messages, much like the conventions that let a letter written in one country be understood in another. Because everyone follows the same protocols, devices of many types and brands can talk to each other.

It helps to separate two terms people often mix up. The internet is the underlying network that carries data. The web is one service that runs on it: linked pages that you view in a browser. Email, video calls and online games also use the internet but are not the web.

Addresses: how devices find each other

For data to arrive in the right place, each connected device needs an address. On the internet this is an IP address, a number that identifies a device or a network connection. A traditional version looks like four numbers separated by dots, for example 192.0.2.1, each between 0 and 255. A newer, longer format exists too, because the older one cannot provide enough unique addresses for every device.

Numbers are hard to remember, so we use names. A domain name such as example.com is a human-friendly label. A system called the Domain Name System, or DNS, works like a phone book: your device asks a DNS server “what is the address for this name?” and gets a number back. Only then can it contact the right machine.

Your own device’s address often changes, and the address visible to the outside world is typically shared by everything on your home network. This is one reason an address on its own does not usually say much about who you are, although it does reveal things such as the general region, which is worth knowing when thinking about online safety.

Packets: breaking messages into pieces

When you send or receive anything, whether a photo or a web page, the data is not sent as one block. It is split into many small chunks called packets. Each packet carries a piece of the data plus a label with the sender’s address, the destination address and a sequence number.

A useful analogy is mailing a long book by posting each chapter in a separate envelope. The envelopes may take different routes and arrive in a different order. Because each is numbered, the receiver can put them in order, and if one goes missing the receiver can ask for it again.

Small packets can take another path if part of the network is busy or broken, and many conversations can share the same links at once.

Routers: the sorting offices

Packets are passed along by devices called routers. A router reads the destination address on each packet and decides which neighboring connection to forward it to, a bit like a sorting office choosing the next truck. A packet usually crosses many routers on its way. No router knows the whole route in advance; each makes a local decision about the next step.

Your home router connects your devices to your internet provider. Wi-Fi is just the wireless link between your device and that router, and the internet proper starts beyond it. This is also why concerns about public wi-fi relate to who else shares that first link.

Servers and clients

A server is a computer that is set up to provide something on request, such as web pages, video or email storage. A client is the device asking, usually your phone or laptop running a browser or app. These are roles, not special kinds of hardware; the same machine can be both at different times.

Servers are often housed in large buildings called data centers. When people talk about cloud storage, they mean files kept on someone else’s servers rather than on a drive you own, which has different trade-offs.

What happens when you open a web page

Here is the sequence in simplified form when you type an address into a browser:

  1. The browser asks a DNS server for the number that matches the domain name.
  2. Your device sends packets to that address, asking the server for the page. The request uses HTTP, the protocol of the web.
  3. The server replies with the page’s content, again as packets, which pass back through routers to you.
  4. Your device reassembles the packets, and the browser draws the page. The page usually refers to further items, such as images or style files, so the browser repeats the request for each of them.

This often takes a fraction of a second, although speed depends on distance, congestion and how busy the server is.

Security and privacy in outline

Many web addresses begin with https, which means the connection is encrypted. Encryption scrambles data in transit so that others who handle the packets along the route cannot easily read the content. It does not guarantee that a website is honest or safe; it mainly protects the conversation between you and the site. The lock icon in a browser means the connection is protected, not that the site’s claims are trustworthy.

Websites may also use small tracking tools, and web trackers can follow activity across sites. General good habits, such as keeping software updates installed, apply to every device that connects. These are general principles; for your own situation, official guidance from reputable security organizations is the right place to check.

Why this matters for learners

Knowing the basics helps with everyday problems. A page that will not load might point to a DNS problem, a server problem or your own connection. For people with weak or no home internet access, materials that can be downloaded once and used offline are especially valuable.

The complete guide to science and coding basics

Computational Thinking: Solving Problems Like a Programmer
Read the guide

Keep exploring

Guides from other topics

All topics →