WordPress templates are the building blocks of themes. They are PHP files that determine how your website is displayed in a browser. They are like those “fill in the blank” stories you did as a child. The “blanks” are information stored in your MySQL database, the rest of the story is the template.
When your hosting server executes the code in a template, the predetermined layout (specified in the template) is merged with your specific content (frpm your MySQL database) to create an HTML page for your browser.
WordPress themes are comprised of dozens of templates. For example, an “archive.php” template for a category archive (click here for a sample category), and a “single.php” for a single post (click here for a post example).
IMPORTANT TIP: As a WordPress user, you probably don’t need to know much about templates, but you may run across WordPress solutions online that suggest adding a snippet of code to a template. Before testing any of these template modifications, I recommend learning how to create a child theme. Of course, always backup your site before making any PHP changes, and in a perfect world all testing would be done on a staging site (not your production site.)