WordPress Templates fit together like the pieces of a puzzle to generate the web pages on your WordPress site. Some templates (the header and footer template files for example) are used on all the web pages, while others are used only under specific conditions.
How it works
WordPress uses the Query String — information contained within each link on your web site — to decide which template or set of templates will be used to display the page.
First, WordPress matches every Query String to query types — i.e. it decides what type of page (a search page, a category page, the home …