For each controller in a Rails application, there is a corresponding views directory that contains template files used to display the views for that controller's actions. The final HTML output is composed of templates, partials, and a layout. Templates can be written using ERB or Builder and partials allow breaking templates into reusable chunks. A single layout is used to combine the templates and partials, typically inserting the template content using yield.