The web.config has now been refactored, and with ASP.Net 4 a lot of the settings that were previously found in the web.config file have now been moved to the machine.config file. This significantly reduces the size of the file, which I think is a great bonus.
Web.config transformations cater for moving your application between your relevant environments (e.g. DEV, QA, PROD). The transformations work on the relevant configurations you setup.
To create your own Configuration build with configuration transformations, create a new ASP.NET Web Application in Visual Studio 2010. Next, in the menu select "Build" and then "Configuration Manager". In the "Active Solution Configuration" drop down, select "New". Name the relevant configuration, for example I'm calling mine "DEV" and copying the settings from the "Debug" configuration.
Make sure "Create new project configurations" is selected. Once you click okay, you will see your Web.config file now has a "+" next to it in your solution explorer.
If you don't see the "+", build you solution, right click the web.config file and select "Add Config Transformations".
You will see for each of your build configurations there will be a "Web.[Build Configuration Name].config" file. If you open any of these files, you will see place holders for different sections of your original web.config file.
To change settings per your relevant build configuration, check out the following MSDN Article:Web.config Transformation Syntax for Web Application Project Deployment
Hope this helps.