In the old days sailing ships had ornamental figureheads on the bow. They had a timber that stuck out several feet forward from the main deck called the bowsprit. To this was attached all the rigging for the jib sails. Slung under the bowsprit was a net made of rope the size of your thumb with holes 8 to 10 inches square. This was a safety net and support for the deck hands to tend the jib rigging.
The ships did not have plumbing. When a sailer had to relieve himself he would climb out onto this net slung under the bowsprit, squat down, and do his business. If he told anyone where he was going he would say he was going to the "figurehead." In a short time this was contracted to "head."
Habit caused the term "head" to be used when ever a sailor referred to the toilet. Today most sailors have no idea why it is called the "head."