Drupal Theming is hard enough when it comes to dealing with CSS & browser rendering issues. On the other end, for programmers the code templating process can be powerful and convenient once we get the hang of Drupal’s theming system.

A community documentation page at Drupal.org offers a good introductory overview of themable output, covering the basics of data source and overrides:

At Packt Publishing there is a book excerpt by John Albin Wilkins discussing Drupal’s theme layer in more detail, covering hooks and preprocessing functions:

If you like that second article, I do recommending getting the book: Drupal 7 Module Development for more details on Drupal’s inner-working.