What is the difference between placing code on a page template vs in the head tag content/css?

For example, in the head tag, I have a toolkit...