A mail template is a similar concept to a mail merge document. The mail is written using placeholders for information that changes between each specific instance of the mail. The mail template is stored then when a mail is to be sent values are substituted for the placeholders.
Mail templating in Drupal is currently (as of Drupal 5) implemented by storing a subject and body in the database somewhere (typically in the variable table). Editing the templates is done with code similar to that below:
$default_subject = 'My default subject at !site';
$default_body = "Dear !user,\n\nThis is the default body for the mail.\n\n!site team";
$form['my_mail_subject'] = array(
'#type' => 'textfield',
'#default_value' => variable_get('my_mail_subject', $default_subject), ...
);
$form['mail_mail_body'] = array(
'#type' => 'textarea',
'#default_value' => variable_get('mail_mail_body', $default_body), ...
);
In the new implementation this becomes much simpler. The form interface is provided by centralised code. You call one function and tell some information about the mail such as the mail type (e.g user welcome mail or shipping notification), title and description of the form's select element and the variable (in the variable table) holding the mail ID.
define('MAIL_VARNAME_MY_MAIL', 'my_mail_variable');
...