The Domain Name System (DNS) helps to translate web addresses we type (“Facebook.com”) into their IP addresses which saves the end user time as they aren’t required remember the string of numbers for every website they want to visit.
Domain names are the human-readable website addresses we use on a daily basis while the IP addresses and behinds the scenes when the user enters “Facebook.com” the IP address it navigates to is 22.214.171.124 and the primary reason is “Facebook.com” will be more meaningful and useful to the end user. As a result the improves connection speeds for your computer as it skips DNS request phase.
A DNS Server is a directory that matches domain name to their respective IP addresses. It is the place whereby your computer contacts your current DNS Server and ask what IP address is associated with the domain name. Most cases DNS Servers you use is provided by your Internet Service Provider (ISP) whereby the router provided is acting as a DNS server and is forwarding request to your ISP’s DNS Servers.
Malicious software or viruses installed on your PC can change your default/override DNS server to a DNS Server run by a malicious organization. Let’s say if your network or computer is pointed to a malicious DNS server set up by a scammer, the DNS server can respond with a different IP address entirely which points to an entirely different domain name which will compromise the security. Do ensure you’re running a good anti-virus/malware program to protect against this.