title: How does hook_theme() work?
body: <p>I am having a hard time understanding what <a href="http://api.drupal.org/api/drupal/modules--system--system.api.php/function/hook_theme/7" rel="nofollow">hook_theme()</a> does.</p>
  
  <p>My understanding is that it has something to do with making it possible to override templates.</p>
  
  <p>I was looking at:</p>
  
  <pre><code>  $theme_hooks = array(
      'poll_vote' =&gt; array(
        'template' =&gt; 'poll-vote',
        'render element' =&gt; 'form',
      ),
      'poll_choices' =&gt; array(
        'render element' =&gt; 'form',
      ),
      'poll_results' =&gt; array(
        'template' =&gt; 'poll-results',
        'variables' =&gt; array('raw_title' =&gt; NULL, 'results' =&gt; NULL, 'votes' =&gt; NULL, 'raw_links' =&gt; NULL, 'block' =&gt; NULL, 'nid' =&gt; NULL, 'vote' =&gt; NULL),
      ),
      'poll_bar' =&gt; array(
        'template' =&gt; 'poll-bar',
        'variables' =&gt; array('title' =&gt; NULL, 'votes' =&gt; NULL, 'total_votes' =&gt; NULL, 'vote' =&gt; NULL, 'block' =&gt; NULL),
      ),
    );
  </code></pre>
  
  <p>Could you provide an example of how it works?</p>