Templates are included from the controllers via the display object, and are used to to build the pages. Each site has its own set of templates located in phork/sites/[sitetype]/templates/ and named in lowercase with the extension .phtml.
Templates shouldn't actually do any heavy lifting; any data used to build the template should be passed to it, and not retrieved by the template itself.
If a template is included from CoreController the displayNode() method should be used. If a template is included from another template the includeTemplateFile() method should be used.