The "head" aboard a Navy ship is the toilet or water closet. (For the Navy, water closet is more official than toilet or bathroom. The spaces are commonly labeled “WC” even though that is not a popular usage in the United States.)
The term comes from the days of sailing ships when the place for the crew to relieve themselves was all the way forward on either side of the bowsprit, the integral part of the hull to which the figurehead was fastened. This position allowed any odors to be blown away from the ship since the relative wind typically was from astern on sailing ships.