The user guide will answer many of these questions, but at a high level, Network Detective enumerates the network endpoints via:
Network port scan
Active Directory
WMI
Remote registry
ICMP
File system scanning
Windows registry
Windows shares and permissions
Security Center