Web.config is the main settings and configuration file for an ASP.NET web application. The file is an XML document that defines configuration information regarding the web application. The web.config file contains information that control module loading, security configuration, session state configuration, and application language and compilation settings. Web.config files can also contain application specific items such as database connection strings.
Each web application in ASP.NET inherits their base web.config from the machine's web.config located in \System Root\Microsoft.NET\Framework\Version Number\machine.Config