The Domain Name system (DNS) is a system that helps associate your domain name with an assigned IP address. DNS associates your domain name with its IP address so the system can recognizes the domain name and translate it to IP address. This means that when DNS is set up, the IP address associated to your domain name it will be the IP address of your hosting provider or the static IP address of your virtual private server (VPS) or the static IP address of your on-premise network.
A domain Name is literally a name that user puts in the search bar of the browser in order to reach that website or webpage. The Domain Name System translate the domain name into IP address that point to your hosting or VPS or your static on-premise IP address.
Why Changing DNS records ?
Changing DNS records for many reason which are :
1 – Switching from hosting provider to another hosting provider
2 – Cloud hosting
3 – On-premise hosting
DNS Changes will propagate within a few hours, sometimes a few minutes (in my case), but it can take up to 48 hours to propagate across the internet.
Note that your Internet service provider needs also to update his DNS records, so 48 hours should be enough do to so.
A typical scenario : you have bought your domain name from xyz domain registrar and you are planning to host your website with zxy hosting provider.
To do so login into your account manager offered by your domain registrar and search for A Record and type in the new IP address you want to use.