Template files are also a part of your theme and play an important role in how the website is displayed to the site visitors. It mainly deals with the website layout and its components. Some examples of the template files are
By the way, the template files in WordPress are reusable. This means that you can use query strings to call a template or a set of templates dynamically. These query strings look for template files with specific names in the current theme’s directory and use the first matching template file as specified by the hierarchy.
For a more detailed understanding of the WordPress template hierarchy, you may have a look at the below resources.