A DNS server is used to convert Internet addresses to and from computer readable and human readable forms. There are generally two purposes of having a DNS server.
Having a DNS server running on your local network allows you to have custom names for each computer system connected to the network (for example desktop1.my.network, desktop2.my.network, server.my.network etc.) and also allows for faster address conversion when accessing sites on the Internet.
A DNS server is also used to publish the domains you have to the internet. For example if you own mycompany.com you will need a DNS server to point mycompany.com, www.mycompany.com, etc to the IP address of your web server as well as having mail.mycompany.com point to your mail server.
Frequently Asked Questions
When is a DNS server useful?
You would normally run a DNS server on a server which runs on a internal network or when you own a domain.