A web application (using server-side scripting) dynamically creates HTML pages using content from a database. It also serves forms that allow users to update content in the database.
A web framework provides a lot of starter code to make the development of a web application much easier. Examples of web frameworks include ASP.Net (usually using C#), Java Server Pages (using java, not javascript), PHP and Ruby on Rails.
Modern web frameworks use the MVC (Model, View, Controller) architecture:
Rails also uses a routing system, which handles a request from the web browser and directs it to the right controller.