A web application 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 (e.g. Rails) provides a lot of starter code to make the development of a web application much easier. 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.
The diagram below depicts how the MVC components work together.