The templates are located in cgi-bin/Templates/ and coded in HTML with HTML::Template extensions (http://search.cpan.org/search?query=HTML%3A%3ATemplate).
The most important templates that are commonly found to be edited are:
main.html - header / footer, CSS / JS includes
upload_form.html - upload form found on the index page
download0.html - pre-download page with advertisements (non-premiums only)
download1.html - download page (contains the counter, CAPTCHA and 'Generate direct link' button)
download2.html - direct link page (only if admin_settings -> Mods ->Show direct link is enabled)