The answer is surprisingly simple for Windows computers. It attempts to connect to
http://www.msftncsi.com/ncsi.txt
NOTE: This address has been updated to www.msftconnecttest.com/connecttest.txt starting with Windows 10, version 1607
If it receives a HTTP 200 (if it receives the text “Microsoft NCSI” in the file) then you are on the internet – if it does not receive this text then you receive the warning symbol on the network item in the system notification area.
So, if you don’t have internet connectivity but need your computer to think you have for some reason (because a piece of sofwtare requires it for a lab or some toher reason) then yuo can simply create your own version of the abve site and file using your internal servers and DNS and fool your computers into thinking that they are indeed internet connected.