Ok, still a little confusion here so i'll try and clear it up a little. I've knocked up a quick diagram to try and show the different parts that go into making a website.
click here for the original png.
The application layer is largely independent from the web server. You can run php / python / perl / ruby on both Apache and IIS, and ASP.net on IIS (although there are projects to get it running on Apache, not sure how far along they are).
The framework is tied to the scripting language. You can only use Rails with Ruby, Symfony with PHP etc. You can also skip the framework layer altogether and write perfectly good scripts without one. The purpose of the framework is to provide a structure to your code, seperate data access / business logic and presentation, and in some cases, provides helpers to gerenate code for you and speed up the development process.
The presentation layer is what the browser sees. This is usually HTML or XHTML, but doesn't have to be - you can send XML or CSV or PDF, etc, it's up to you how you format it in your application.
In the case of HTML or XHTML, you can use CSS to change the way it looks in a browser, and you can use JavaScript to add dynamic functionality such as animations or background loading / updating without a page load. This is completely independent of whatever scripting language you use on the server.
JavaScript now has a number of frameworks with pre-built code that does all of these fancy wizzy animations and features that usually result in a website being branded "web 2.0".
How you tie all of these together is completely up to you.