Two branches of theming: templates and functions Here is the description of theming overrides in Drupal. That (pdf page) great colorful scheme is relevant to Drupal 6, however, as I got that, there are no basic changes in the 7th version that are worth mentioning now. Anyway, Drupal (theme() function) either calls hook as a function (i.e. theme_smthing) or as a template, i.e. template_preproces_smth() -&gt; template_process_smth() -&gt; smth.tpl.php

When I have to override deafault Drupal markup, what way I should do this: with theme_ ... or template_ ... ? Why are there two mechanisms that do the same think? (Or it's resonable and I just haven't understood proper;y what id writen there). Can anybody explain these basics?

Thank you.
Theme functions and preprocess functions do not do the same thing. A preprocess function is a precursor to a theme function. A theme function may optionally be implemented as a template file (.tpl.php) rather than a function.

Preprocess functions are created when a module implements hook_preprocess(). If you read the documentation for that hook, it explains that the purpose of a preprocess function is to prepare variables for use within a theme function or template. Also, not all theme functions have a complimentary preprocess function.

Similarly, a theme function (or template) is created when a module implements hook_theme(). A theme function or template is the place where the variables previous prepared in the preprocess function are printed to the screen and wrapped with any desired HTML. 

So, the idea is that a preprocess function prepares the variables/data in question and the theme function presents the data to the user, usually wrapped in HTML.