This is a security feature called User Account Control. Whenever a program requires administrative privileges, Windows asks the user for confirmation. This prevents potentially malicious software from accessing important files and settings without the user's consent. More specifically, in this scenario, UAC prevents an application from installing without permission.
By default, Windows tries to create a controlled environment (called 'secure desktop') to present these messages in, by darkening the rest of the screen and temporarily halting other programs. This additional layer of security can be disabled. Doing so allows malware to interfere with the UAC boxes and is therefore recommended only in cases where dimming the desktop takes an exceptionally long time.
The behaviour of UAC can be configured through the Control Panel, User Accounts, 'Change user Account Control settings' or by clicking 'Change when these messages appear' whenever a UAC message pops up.