A port scanner is security analysis software that maps out networks and identifies the services running on each host. It attempts to determine remotely which ports on systems are open (i.e., whether systems allow connections through those ports).
Attackers use port scanners to find vulnerable hosts and network services. System administrators use them to monitor what host and network services are connected to their network. Weak or improperly configured services and hosts can be found and patched.