As a popular security tool a lot of Linux distribution includes it as package. Which means it can be downloaded from distribution specific package manager. Here are some of them
$ yum install nmap -y
$ apt-get install nmap -y
$ yast install nmap -y
Windows have pre-build binaries and can be downloaded from here
Install From Source
Nmap can be installed from source. Source code can be get from official Nmap site.