It is quite simple: you'll need a modem to connect your device to the internet. Modem performs proper modulation and demodulation. Actually, you could think of it this way: whatever data you're browsing, the search results comes from a web server or data server. That portion of internet is referred to as the core network. In most cases, your laptop generates digital data. However, communication mediums include wireless channels, coaxial cables, and fiber optics etc., are analogue in nature. A modem is required to convert analogue to digital data and vice versa.
You just need a modem if you simply need to connect one device to the internet. A router is required if you want to connect several devices. Even then, a modem is necessary.
Now we'll talk about how a router works. A modem and a router serve different purposes. As an interference between your computer and the core network, a modem is required. Because internet data signals are analog, and your computer can only generate digital data and understand binary 'zeroes' and 'ones.' In most cases, routers include a built-in modem.
The router's function is 'routing.' When you do a search in your browser, it uses numerous intermediary networks to transfer your request to a nearby server. When we communicate with another device on the same network, we don't need to use routing. However, if devices are connected to a different network, a router is required. As a result, there are numerous intermediate networks available to connect you to a nearby server. Intermediate routers are what they're called.
Let's get right to the point. We also use a router at home and in small offices. We're going to connect a few devices to the same router. Switching between devices is the primary function of such routers. For instance, there are four devices that can be connected. Then the devices are then connected to the internet via the router's various ports.
We utilize SUBNET to connect hundreds of devices in large offices or lab rooms, even if they are in different rooms.