Rails splits an app into models, views and controllers, so data rules, page markup and request handling each live in their own place.
The model is an Active Record class. It holds the data, the validations and the business rules, and it maps to a database table.
The view is a template, usually ERB, that turns data into HTML or JSON.
The controller receives the request, asks models for data, and then renders a view or redirects to another URL.
A request reaches the router first. The router calls a controller action, the action works with models, and the controller sends back the rendered view as the response.
Keeping business rules in models, out of views and controllers, makes them easier to test and reuse.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.