When a hosting provider allocates space on a web server for a website to store its files, they are hosting a website. Web hosting makes the files that comprise a website (code, images, etc.) available for viewing online. Every website you’ve ever visited is hosted on a server.
The amount of space allocated on a server to a website depends on the type of hosting. The main types of hosting are shared, dedicated, VPS and reseller. They are differentiated by the kind of technology used for the server, the level of management provided and the additional services on offer.
In a nutshell, web hosting is the process of renting or buying space to house a website on the World Wide Web. Website content such as HTML, CSS, and images has to be housed on a server to be viewable online.
Web hosting, also known as website hosting or shared hosting, is one of the most popular ways through which businesses can build an online presence.
Shared web hosting is effectively a server (computer) split into many different private customer areas, with each area having its own space for files (web space) and ability to transmit these files (bandwidth). These areas are then accessible through a domain name (owned by the customer).
When you type in "www.domainname.com", the website that appears is running on a web hosting platform.