It is a free open-source tool that is ideal for system administrators. You can use it to track ports and evaluate network security, as well as to get information about the same.
It can also be used to analyze network performance by evaluating the response times by pinging different devices. You can scan the ports of the equipment connected to a given network, see if they are open, check the available services on these machines, or evade their firewalls.
For these reasons, even though Nmap is a tool that is designed to improve network security, its features also allow you to use it to take advantage of network vulnerabilities. This is why it it is a program that is used in the hacking world.
Nmap has a thorough reference guide, which will allow you to explore the different uses of the program in depth.