Nameservers are like directory service booth at mega shopping mall, where you can obtain exact location of the store name you are looking for. In a similar situation, nameservers are special computers on the internet that is given the function to serve IP addresses of the domain name being requested.
In a real life scenario, you enter a domain name for example (www.dotservant.com) in your web browser, your internet connection provider will first send a query to a nameserver asking for the IP address for this domain name, nameserver will search it's record and return the matching IP address, the IP address is then being sent back to your web browser. After obtaining the actual IP address of the domain name, your web browser will have the information of the actual location of the domain name entered for further information request, such as requesting for the home page of the domain (www.dotservant.com). You may not notice this process all together, as the entire process happens behind the scene and works pretty fast before you even notice it.
When you register a domain name and wanted to setup a domain hosting account to host web pages for the domain, you will be asked to change the nameserver record for your domain to point to the nameserver pair given by the web host, this process is basically to allow the web host to take control of your domain name zone file and broadcast the IP address of your domain to all internet connection provider to inform them that your domain name is now setup in one of the server with the web host.