Thereare two PHP files that automatically get loaded in the HEAD tag of the template: beforehead.php and head.php.
beforehead.php
If beforehead.php exists in the selected (primary) theme or the core theme, it will automatically get loaded in the HEAD tag of your template before Joomla!'s header information gets loaded.
head.php
If head.php exists in the selected (primary) theme or the core theme, it will automatically get loaded in the HEAD tag of your template before Joomla!'s header information gets loaded.
In other words...
<html>
<head>
<!-- Code from beforehead.php gets loaded here. -->
<!-- <jdoc:include type="head" /> gets loaded here. -->
<!-- Code from head.php gets loaded here. -->
</head>
...
