A SharePoint web application defines a web "service point" (located at a particular DNS address and bound to a specific port). However, it is aware of network load balancing and it "knows" that a particular URL request may be served by any web-front-end server in SharePoint farm.
Hence, the "web application" is actually a configuration description stored in "configuration database".
Each front-end web server is configured according to web application settings from config DB. Here, an IIS web site comes into play - a web application technically is a set of iis websites on all front-ends serving the same URL endpoint of sharepoint farm.
Each "extended" IIS website contains several specific virtual directories which are mapped to folders under "c:\program files...\12\", (e.g. "_layouts", "images"). Such site also has specific web.config configuration, since SharePoint adds itself as an HTTPHandler.