When the user tries to access a page, if their MAC isn't listed as being logged in, they are directed to the portal page instead of whatever they tried to load.
DNS is needed because unless a client can resolve a hostname, it will never try to load a page, and thus would never hit the portal.