In order to have a website online you need:
- A domain; www.thisisadomain.com
- Hosting; A place where the database and files are stored.
The Hosting is connected to your domain via nameservers. Nameservers identify a server i.e. the location where your site is “saved”. Your domain can be registered with a different provider than your hosting.
Example by Analogy:
- Your domain is similar to your street address i.e. www.yoursite.com = 123 Main St
- Your server is similar to your house i.e. The Server where your site’s files and database are stored (Hosted) = Your home with all your belongings.
Your website needs a server to “host” and display your site, this server houses all of the files and the database. Your domain connects to your server (hosting) and displays your website!
Related: Transferring Ownership of a Domain.