You can get it like this :
$term = taxonomy_term_load($tid);
$field_header_image = field_get_items('taxonomy_term', $term, 'field_header_image');
if ($field_header_image) {
$headerimg = field_view_value('taxonomy_term', $term, 'field_header_image', $field_header_image[0], array('type' => 'image'));
}
print render($headerimg);
If you want to use an image_style :
$headerimg = field_view_value('taxonomy_term', $term, 'field_header_image', $field_header_image[0], array(
'type' => 'image',
'settings' => array(
'image_style' => 'my_image_style', //place your image style here
),
));
Here is a contextual answer if you are on your taxonomy term page.
In your file template.php
use the theme_preprocess_page
function like this :
function mytheme_preprocess_page(&$vars) {
$term = menu_get_object('taxonomy_term', 2);
if ($term) {
$field_header_image = field_get_items('taxonomy_term', $term, 'field_header_image');
if ($field_header_image) {
$vars['headerimg'] = field_view_value('taxonomy_term', $term, 'field_header_image', $field_header_image[0], array('type' => 'image'));
}
}
}
Then in you page.tpl.php
you can print render($headerimg);