The Internet or Cloud, is a very big place which you can't see in a single frame. A lot of it exists in a virtual world. The physical components or hardware can be easy enough to imagine but the rest of it exists in the "ether", as they say. These are the electronic on/off signals (bits) bundled together into packets travelling along copper and fibre optic cables that crisscross the globe under the sea, along streets and into our homes. Other packets are air-bourne over wireless, bluetooth and between satellites and dishes on the ground. All these packets pass through routers or gateways and between servers and our devices, at the speed of light. It is the constantly online nature of all these things, that makes up what we call the internet or the cloud.
The first thing to understand is that what you do in that virtual world - the internet, happens in "public", much like what happens on public streets or in a mall. You may not be able to hear conversations but generally speaking where people are going and how they get there, is fairly apparent to everyone sharing the same virtual, public spaces.. and more so for the providers of those spaces. It's a necessary evil that if you want to find someone or something, you have to leave your home for those public spaces. OK you're not physically leaving your home when you click or tap a link on your device to go online shopping or make a Zoom video call but in terms of the data that has left or entered your device, it's out there in the public. The data passes through many gateways to your destination and back so we have to trust the managers - people, computing hardware and software at these gateways. Much like we have to trust a postmaster with your snail mail or the freight company with your Amazon orders and everyone in between them and you, when things are in transit to you.
So the internet is a public network available to and visible to all, with a relatively simple device such as a mobile phone with a data plan.
Where the internet is an unimaginably huge public network, local networks are what we tend to use when we work in an office, run our own business with networked computers and mobiles, and also when we use the hot-spot or wireless access points in our homes. In the techie world these private or local networks are abbreviated to LAN: Local Area Networks. There are a number of important distinctions between the two. The key point being LAN's are private networks:
Local networks enable you to share things quickly without having to go through the internet. They work a hell of a lot faster and the activity on these networks are private.
Many different types of devices and services in your home or office can share over your local network: Printers, computers, tablets, phones, CCTV cameras, etc.. again this happens in a private network.
Local devices on your LAN can't be seen or accessed by devices on the internet, ordinarily.
Even if your connection to the internet is down, you can still do stuff on your LAN, which is not dependent on the internet. File sharing and printing are examples.
Local networks include using your phone or a USB modem as a hot-spot and connecting one or more devices to the internet.
In all these scenarios, the device which you are connected to locally is generally called a router or gateway. In your home this could be your NBN (or other provider) wireless router. Your phone or USB modem, if used as a hot-spot, is also your router or gateway. Routers provide local access to resources on devices in your private network but also on the internet. Off-grid satellite connections to the internet also use a router to share the internet amongst multiple devices on-site, through a LAN. For example Elon Musk's STARLINK or NBN's SKYMUSTER provide a router with a wireless hot-spot that creates a LAN so you can share the internet locally and connect to services on local devices via the LAN. Printer and file sharing are the most common services but you may also share CCTV cameras over this network for monitoring your assets on site.
So your LAN is your private space. You can add or subtract devices from it, as you please. You can also manage these devices your self, via your LAN. None of this is dependent on the internet.
You've probably heard the term Firewalls before and thought I'll never get what it means so hopefully the illustration I chose helps in understanding what I'm about to (attempt) to explain. This region has a lot of cattle people so perhaps the analogy of gates might help. That word gates and gateways (I mentioned previously) should give you an idea. When cattle are mustered towards a gate, someone opens and closes it to separate bulls from cows or calves from the herd. In the same way, a firewall controls what passes through a gateway or router and is essentially software that controls what passes from the internet and back to your LAN, and vice-versa (from your LAN to the internet).
But why do you need a firewall? Communication across any medium, is not communication if it's only one way. With computers this is especially so. While we don't want anything coming in from the internet to our LAN's to cause havoc, we do want to receive email, watch NETFLIX and many other things that originate from the internet. A little bit of information must be able to pass through firewalls from your LAN, in order that those packets containing your emails and NETFLIX feed sent by the postmaster and NETFLIX servers, know where to go. So a firewall has to allow your requests from you (your device) for incoming mail from google and your video feed from NETFLIX, to get out to the internet where those services are. The same can be said for any other service your device needs from the internet.
Most firewalls on your LAN in your business or home, will be configured to permit or allow any request from your devices out. On the flip-side they will deny or block any data wanting access to your LAN, except what the firewall knows you have requested from your device. Any data that you did not request and wants to come in, is blocked. In that sense it is like a gate being opened and closed based on rules, much like the person whose rules are to let only the calves in and not let them out. But the analogy with walls is that a holes are opened up and closed in the wall to permit and deny data from passing.