It's not just a Windows thing, but a networking thing.
Your system will try to access a generic website it knows to always be up, and checks the result. If it gets a success code (ie HTTP 200), it knows it has permission to access the internet, and lets you go on your way.
This sort of system is known as a Captive Portal. Before authentication/authorization has completed, when the client requests a web page, an HTTP 302 error code (redirect) is returned, and the Location response header includes the URL to direct the user to.
RFC 2138 also describes the process, and what is required, to setup such a system.
Wikipedia has a good quick write-up about how the system works. In my school that I work at, we have all the user accounts on the server for regular file sharing. We have our HP Wireless Controllers connect to the server when authenticating users, so everyone can log in with their own credentials, without bugging the IT department, or having one generic login.