Please refer to the following URL to know the differences between web.config and machine.config,http://onlydifferencefaqs.blogspot.in/2012/07/aspnet-difference-faqsdoc.html
Web.config file is to override the settings from the machine.config file. machine.config file settings are applied to all the webapplications residing on the server while web.config settings are application specific.
web.config" is scoped to a particular directory. You use it to override machine.config for a particular application or application sub-folder