Blog / Tutorials

How the Internet Actually Works: A Simple Explanation for Teen Developers

, 9 min read

You use the internet every day but probably have no idea how it actually works. You type a URL, press enter, and a website appears. Magic? No. Engineering. Understanding what happens in that fraction of a second makes you a fundamentally better developer.

The Physical Layer

The internet is not in the cloud. It is in the ground. Literally. Hundreds of thousands of kilometers of fiber optic cables run under the oceans connecting continents. These cables carry data as pulses of light at nearly the speed of light.

When you access a website hosted in the United States from Biratnagar, your data travels through cables from your router to your ISP (Vianet, WorldLink, or whoever you use), through Nepal Telecom international gateway, through submarine cables under the Indian Ocean, and eventually to a data center in the US. Then the response comes back the same way. This entire round trip takes about 200-400 milliseconds from Nepal.

IP Addresses

Every device connected to the internet has an IP address — a unique numerical identifier. IPv4 addresses look like 192.168.1.1 (four numbers separated by dots). We are running out of IPv4 addresses, so IPv6 exists with longer addresses like 2001:0db8:85a3:0000:0000:8a2e:0370:7334.

Your home router has a public IP address assigned by your ISP. Devices on your home network have private IP addresses (usually starting with 192.168). The router translates between them using NAT (Network Address Translation).

DNS: The Internet Phone Book

You do not type IP addresses into your browser. You type domain names like google.com. DNS (Domain Name System) translates domain names into IP addresses. When you type google.com, your browser asks a DNS server "what is the IP address for google.com?" and gets back something like 142.250.185.78.

This lookup happens before your browser can even start loading the page. It typically takes 10-50 milliseconds. Your computer caches DNS results so it does not have to look up the same domain repeatedly.

TCP/IP: The Delivery System

Once your browser knows the IP address, it needs to send a request and receive a response. TCP/IP is the protocol stack that makes this possible.

IP handles addressing — getting data to the right destination. TCP handles reliability — making sure all the data arrives, in the right order, without corruption. Together, they break your data into packets, send them across the network (possibly through different routes), and reassemble them at the destination.

HTTP: The Language of the Web

HTTP (HyperText Transfer Protocol) is the language your browser uses to communicate with web servers. When you visit a website, your browser sends an HTTP GET request to the server. The server responds with an HTTP response containing the HTML, CSS, and JavaScript that make up the page.

HTTPS is HTTP with encryption. The S stands for Secure. When you see the padlock icon in your browser, it means the connection is encrypted using TLS, so nobody between you and the server can read the data.

What Happens When You Type a URL

Step by step: You type arnikohackclub.com and press enter. Your browser checks its DNS cache. If no cached result, it asks your ISP DNS server for the IP address. Your browser establishes a TCP connection to that IP address (the three-way handshake). If HTTPS, a TLS handshake encrypts the connection. Your browser sends an HTTP GET request for the page. The server processes the request and sends back HTML. Your browser parses the HTML and finds references to CSS, JavaScript, and images. Your browser makes additional requests for each of those resources. The browser renders the page by combining HTML structure, CSS styling, and JavaScript behavior. The page appears on your screen.

All of this happens in under a second for a well-optimized website.

Servers and Hosting

A web server is just a computer running software that listens for HTTP requests and sends responses. When we say a website is "hosted" somewhere, we mean there is a server (physical or virtual) running the website code and responding to requests.

Cloud providers like AWS, Google Cloud, and Azure run massive data centers full of servers. When you deploy a website to Vercel or Netlify, your code is distributed across these servers worldwide so users get fast responses regardless of their location.

Why This Matters for Developers

Understanding how the internet works helps you debug problems. If a page loads slowly, is it DNS? Is it the server? Is it the network? Is it the browser rendering? Each layer has different tools for diagnosis.

It also helps you build better applications. Understanding HTTP methods, status codes, headers, and caching lets you design efficient APIs. Understanding TCP helps you choose between TCP and UDP for different use cases. Understanding DNS helps you configure custom domains and email correctly.

You do not need to memorize every protocol specification. But having a mental model of how data flows from browser to server and back makes you a fundamentally more capable developer.