Scanning and the later enumeration of a target is an important step in compromising a system. Through this process, you will learn about an environment, what ports are open and what possibly can be extracted from the services behind those ports. This information will help you plan your next steps better and more accurately than you could otherwise.
While scanning will inform you where the live targets are, as well as what ports have been left open, enumeration moves you to the next step of attempting to extract useful and meaningful information. Using tools such as nmap, nslookup, and smtp-user-enum, it is possible to reveal users, groups, and other information about the host and the network surrounding it.
In the next chapter, we will explore gaining access to a target system by finding vulnerabilities.