Custom module and template.tpl.php files
There are a lot of examples of use of the Drupal API for module developers in the Drupal documentation. In particular, you may find the Examples for Developers module handy, especially the "theming_example" sub-module. This is not an actually functional module, but just a container for a lot of example code that new developers can test, manipulate and learn from.