Templite is the template engine behind <TextField>, and it's small on purpose. There's no separate language to learn. Every tag compiles straight down to PHP, and the compiled file is cached, so parsing happens once per change, not once per request.
A variable prints with curly braces: {title}. A flow loops with an "in" clause: {item in $articles} ... {end}. "item" is a prefix you pick to avoid clashing with other loops on the same page; inside the loop, each field becomes {item_title}, {item_date}, and so on. Every item also gets an automatic {item_id}, its zero-based position in the flow.
Conditions read like plain PHP: {if $count > 3} ... {elseif $count == 0} ... {else} ... {end}. The condition really is evaluated as PHP, so any expression you'd put in a normal if statement works here, function calls included.
There are two more tags. {include 'themes/mytheme/header'} pulls in another template file, which is how a header and a footer get shared across pages. And {?any php here} drops into raw PHP for the rare case where a tag isn't enough, say a one-off calculation you don't want to move into a controller file just to print one value.
Everything compiles to a plain .php file under core/tmp/, so you can open a compiled template and see exactly what your tags turned into. When a loop misbehaves, that's usually the quickest way out: forget the theory and read the generated foreach.
For HTML attributes and any text typed by a visitor, use {=title} instead: the value is then escaped for HTML.