When someone says "I'm going to hit the head.", it means they are going to the restroom.
"The expression "hit the head" comes from Navy and Coast Guard jargon for 'bathroom'. Sailors, marines and Coast Guard members call their facilities heads, while land-based military personnel call them latrines. Naval ships actually have the word head stenciled on the watertight doors leading to the cramped but serviceable facilities."
Source(s):
Origins of the expression "hit the head:
http://www.wisegeek.com/what-does-it-mean-when-som...