My advice would be "don't". There are quite significant potential legal ramifications for scanning other peoples infrastructure and thus you could land yourself in a lot of trouble if you're not careful.
This isn't to say that nmap (and it's ilk) are not useful diagnostic tools. But I'd recommend you leave the scanning to infrastructure you either own or have the owners consent - at least for now while you're still learning the tools.
Agreed, if you want to scan the entire internet, you better be someone like fyodor, and even then the authorities will probably come a knocking. https://www.youtube.com/watch?v=Hk-21p2m8YY
This isn't to say that nmap (and it's ilk) are not useful diagnostic tools. But I'd recommend you leave the scanning to infrastructure you either own or have the owners consent - at least for now while you're still learning the tools.