Web hosting is a service that allows internet users to access websites from anywhere in the world by providing servers, data centers, and space on those servers. Depending on the web hosting service, these servers can host one or more websites and be set up with different operating systems for shared, dedicated, or VPS hosting.
When a person wants to view a website, all they have to do is type the web address into their browser. The computer then connects to the server, where all of the website's files (HTML, CSS, images, photos, etc.) are stored in a folder. This server sends these files to the user's browser, allowing them to view the website. In order to build a website, one needs a domain and hosting account.
A domain can be purchased as an add-on from a domain registrar, or you can purchase both the domain name and website hosting from the same company.
However, if you want to use a different web host than the one associated with your current domain, you'll need to update the DNS records.