For maintaining a website You need two things.
You can Buy a domain from any company (such as: godaddy, namecheap, namesilo etc), They will give you a domain name for a period of time. It will cost you on average $6 to $20. Price varies upon the company and the TLD’s (ex: .com, .net, .xyz etc)
You also need a hosting server, (A server is a computer with special software’s installed and always running). You can find many company who sells hosting packages. You can pick one based on your requirements. Usually these hosting package comes with 1GB/5GB/10GB Disk space with 10GB/50GB/100GB monthly Bandwidths. This is also varies upon the companies.
Disk space is the total storage assign to your website. suppose you have 1GB Disk space, This means you can host a website, whose size up to 1 GB. The HTML/CSS/JS/image/videos every page, code files, media all combined must be not more than 1GB in size.
Bandwidth is the data transfer between your website and the visitor. if you have a page which have size of 50 KB, every time a visitor visit the page will cost you 50KB Bandwidth. If your monthly total bandwidth exceeds the package plan, your website will not show on the rest of the month.
There are many type of Hosting. Some of them are:
Shared: The hosting server and its all resources (Ram, Storage Disk, Softwares, Processor etc) will be shared among many clients. Cost friendly, but not secured, not good performance. usually used by beginner level small websites.
VPS: A virtual server on a computer just for you. there are many clients on this computer, but your resources will not be shared. Ideal for small / medium websites.
Dedicated: A dedicated server is a server that’s literally dedicated only to your website. All resources only for you, Most secured and high performance.
If you want to understand the underlying mechanics, you can work on a Domain-Hosting company or ask for internship.
If you have money, you can start your own domain-hosting business. You can start as a reseller, that will cost you less.
If you are able to take all the pressure and hiccup of errors, You can built your own server. Not recommended, not enough tutorial/solutions are available.
I hope you find this answer helpful. Best wishes