A Chain of Small Steps
When you load a web page, the request you typed seems to vanish straight into the cloud. In reality it follows a very ordinary route. First it leaves your computer, then it passes through a couple of small boxes in your home, then out along a cable or wireless signal to a company that connects you to everyone else online. That company is your Internet Service Provider, or ISP. Without it, your computer would just be talking to itself.
The Modem and the Router
Two devices usually do the work of getting you online. The first is a modem. The modem is the box that converts the signal coming into your home — over a phone line, a cable, or a fiber line — into something a computer network can understand. The second is a router. The router takes that one internet connection from the modem and shares it among all your devices, by Ethernet cables or by Wi-Fi. In many homes today, the modem and router are built into a single combined box, but they are still doing those two separate jobs underneath.
What the ISP Does
The Internet Service Provider sits between your home and the rest of the internet. When your router sends out a request, it travels to the ISP, which routes it onward through its own network of cables, fiber lines, and exchanges until it reaches the server you are trying to talk to. The reply comes back the same way. Your monthly internet bill is essentially paying for access to this network and the speed at which it will carry your traffic.
How the Conversation Works
All of this traffic is broken up into small chunks called packets. When you ask for a web page, your request goes out as one or more packets, and the answer comes back as many packets that your device puts back together. The actual link from your home can take many forms — fiber, cable, or a mobile connection — but the basic chain is the same: device, router, modem, ISP, the wider internet, and back.
Source
This article was written using information from Wikipedia.