When you create a character you have the option of having a hat or bonnet. (Hats are currently under the tab for “Hair” in Character Create. Take a look at our article on "Creating your Character".)
In the future you will be able to purchase new hats in the Marketplace, however at this time you can only acquire a hat during initial Character Create. Some outfits, like the men’s Military Uniform, have an associated hat. At this time, you will only be able to remove the Military hat from the outfit if your original character has a hat.
With the second Open Beta update, if your character has a hat you can use the /hat command in chat to wear and remove it. The command will do nothing if you do not have a hat.
Other players should correctly see if you are currently wearing a hat.
(NOTE: We are still working on ensuring both hats and sitting/standing are correctly visible to all players.)