The nslookup command will look up the IP addresses associated with a domain name.
For example, you can run nslookup google.com to see the IP address of google’s server.
Your computer is constantly querying its DNS servers to translate domain names to IP addresses. This command just allows you to do it manually.
nslookup also allows you to perform a reverse lookup to find the domain name associated with an IP address.
For example, nslookup xxx.xxx.xxx.xxx will show you what this IP address is associated with.