So you have a computer with, say, a database on it. No-one else can access that database unless they’re sitting at your computer. If you want someone else to be able to access it in other computers, say, via an internet connection, you need to make it available on that network. So you install a program called a web server (I mean you could write your own, but that’s a wee bit out of scope) which translates incoming messages of a specific format from the network into stuff you can use and let’s you send messages back out. Then you can make it so that when certain messages arrive, you get something from the database and send it back.
NodeJS, for example, has a server built into the program. With a Node application, you upload it’s constituent files somewhere, on a computer in some data centre, and you tell it to start, then it just sits on that computer and runs, waiting for incoming connections. Or a website, what you generally do is upload the files somewhere that already has a web server installed. And when you put those files in a specific directory, the web server knows to serve them when requests come in.
You have to do that because generally there has to be one place where your program runs. If you make an online shop, for example, users can’t just download the whole “shop” program and use it on their own computers without a network: it’s not connected to anything. It would be like having a copy of a physical shop in your living room, except that everything in it is just photographs of the goods & the money is just pretend notes.
Or if you make a website, it has to be hosted at a specific place. If you have some control system for some machinery, it can’t just live on a user’s computer, there’s a physical thing it needs to be connected to.
You can’t do anything particularly useful, internet-wise, without servers. Single-player games, or single-user applications like calculators or drawing programs, they’re fine, you don’t need a server (edit: except how would you download them? You couldn’t. You would have to actually go and get the programs on physical media, as happened pre-internet). But most anything internet-related has to actually live somewhere, a physical location that can be accessed via a URL, and that place can’t be a single persons computer.
“Serverless” is little bit of a misnomer, it means “on a server”. It’s just that you don’t have to set up and manage that server yourself.