As we know, each computer needs an IP address to get connected with others. Internet, where all computers are connected with each other, it is very difficult to remember each address. Human-readable names like, yahoo.com is easy to remember instead of its IP address. How many IP addresses can we remember, 10-20-30, but not more than that. But we can remember lots of names easily.
DNS is just like our telephone directory, where telephone numbers are written in front of their name. We dial the name and it actually dials to number.
DNS works as an agent which resolves www.yahoo.com to its IP address. Physically, web site resides on IP address, but DNS forwards our naming request to that IP address.
DNS resolves the human-readable domain name into the machine-readable IP address.