The role of web hosting is answered below.
As far as the second part of the question is concerned, you can definitely createa website without web hosting but you cannot run it on the internet without hosting.
What is Web hosting?
In simple words, web hosting is the activity of providing storage space and access to websites. It basically is a service which enables an organization, body of persons, associations, and/or an individual to post website(s) onto the internet.
How does it work?
A web host, known as the web hosting service provider provides the technology and the services needed for the website or the webpage to be viewed on the internet by the users.
There are special computers which STORE or HOST the website. These are called servers.
When any user around the world types a URL into their browser, their computer connects them to the server where your website is hosted and delivers the webpage to them through their browser.
What to expect from your hosting provider?
Business Email accounts: With the website rights, you may get email accounts names after your website. For example, your website is. You can create as many emails (given the package you have chosen), like , etc. This will create a trustworthy and professional brand identity in the minds of the users, making it easier for them to reach out to you apart from showing the ownership of your website.
File Transfer Protocol (FTP): Ever uploaded pictures, documents, any kind of data from your computer to a website? Did you know that FTP gives you the access to do that? If you build your website using your own HTML files, you can transfer the files from your computer to the web server through FTP, allowing your website to be accessed through the internet.
WordPress Support: WordPress is an online website creation tool. It is a blogging and website content management system, which is a convenient way to create and manage the website. WordPress powers a major chunk of websites on the internet. Most hosting providers will tell you right away if their plans are WordPress-compatible or not.
Wordpress support is an additional cost. may vary from provider to provider. It may also depend on the platform used for building the website.
SSL Certificate: SSL certificate is the gap between a trusted website and a random website. A hosting provider should make sure that the network security provided is secure for real. It’s like the middlemen striking the deal and taking guarantee of both the parties.
cPanel Details: cPanel is a web-based hosting control panel provided by hosting providers to website owners allowing them to manage their websites from a web-based interface.
This program gives users a graphical interface from which they can control their portion of the Unix server. The tools provided are designed to simplify running and controlling a website. It uses a tiered structure that allows different levels of access.
Administrators and end users can control the different aspects of the server and the website directly through their browser.
Most Web hosting companies offer Domain registration service as well!
It is suggested that both hosting and domain registration is done from same service provider since you might end up getting great deals on the combination and in case there are any problems with either domain renewal or hosting, the service provider can look into it and solve the problem quickly.
Source: Quora Answer