I need help to start programming using templates

I need a PHP class to prgram my site using templates …

And if possible , a tutorial for it …

Thanks