Drupal can use four different types of engines to render themes: PHP, PHPTAL, Smarty, and the default engine, PHPTemplate. Engines are interface libraries, like DLLs in Windows or other libraries you’ve seen used to prevent having to write the same code over and over. Themes are a folder made up of CSS style sheets, images, and so on, but they also contain the template file. The template file typically contains large portions of HTML with small snippets of PHP which get replaced by dynamic content. The syntax of the PHP in the template file depends on the engine being used.
You can tell which engine is being used by the extension of the template file:
Template File Extension