A template connects the dynamic output of Modules with the whole markup located in the layouts by using their containers. Template is a client ressource.
Templates can be assigned to an article or to a whole category. An article, which has an assigned template and is located in a category with an assigned template uses the template configuration itself.
Categories needs a template assignment before articles can be created, otherwise, there would be no information, which content should be edited.