Adding custom javascript code

How do I add custom Javascript code to the head and body sections of all pages on my site?