Can I use hooks in a template for views? I'm still not sure how hooks work.

I want to join a table to one of my views, but I have no idea where I'm supposed to put the hook for that. Do I just stick it in the template for the view? Or where does it go?
The API reference at http://drupalcontrib.org/api/drupal has all of the Views hook in it: http://drupalcontrib.org/api/drupal/contributions--views--docs--docs.php/group/views_hooks/6

That said, the views documentation is a little sparse.  The best thing to do is look through the list of hooks, then search on the various hook names for examples.

I suspect you need to use hook_views_query_alter but I don't think I have ever had to add a JOIN to a view before.

EDIT:

Notice another of your questions: Join a custom table on a View.

In your case, if you want to properly make a custom table Views aware, implementing hook_views_data is the correct solution.  But you still need to do this in a custom module, and not in your theme files.