Types of headgear
Hats often have a brim all the way around the rim, and may be either placed on the head, or secured with hat-pins (which are pushed through the hat and the hair). Depending on the type of hat, they may be worn only by men, women or by either sex.
Caps are generally soft, and often have no brim, or just a peak (like on a baseball cap). For many centuries women wore a variety of head-coverings which were called caps. In the 18th and 19th centuries for example a cap was a kind of head covering made of a flimsy fabric such as muslin; they were worn indoors or under bonnets by married women, or older unmarried women who were "on the shelf" (e.g. mob-cap).
Bonnets, as worn by women, were generally brimless hats worn outdoors which were secured by tying under the chin, and which covered no part of the forehead. Some styles of bonnets had a large peak which effectively prevented women from looking right or left without turning their heads. Bonnets worn by men and boys are generally distinguished from hats by being soft and having no brim - this usage is now rare (they would normally be called caps today).
Helmets are designed to protect the head, and sometimes the neck, from injury. They are usually rigid, and offer protection from blows. Helmets are commonly worn in battle, on construction sites and in many contact sports.
Turbans are primarily worn for two reasons. Firstly due to religious or cultural beliefs and secondly for protection from the elements, especially sun. So you will for example find that the Sikhs are required to wear a turban as a religious necessity while Arabs in the Middle-East wear it for protection and cultural reasons.
Hoods today are generally soft headcoverings which form part of a larger garment like an overcoat, shirt or cloak. Historically, hoods were either similar to modern hoods, often forming part of a cloak or cape, or a separate form of headgear. Soft hoods were worn by men under hats. Women's hoods varied from close-fitting, soft headgear to stiffened, structured hoods (e.g. gable hood) or very large coverings made of material over a frame which fashionable women wore over towering wigs or hairstyles to protect them from the elements (e.g. calash).
Wigs are synthetic hair which may be worn to disguise baldness or as part of a costume. In most Commonwealth nations, special wigs are also worn by barristers, judges, and certain parliamentary officials as a symbol of the office.
Today a veil is normally a piece of fabric which covers all or part of the face. For centuries up until the Tudor period (1485), women wore veils which covered the hair, and sometimes the neck and chin, but not the face.
The most common use of a hat is as protection for the head and eyes. A baseball cap is used by sports players to keep the sun out of their eyes, and by some chefs to keep the hair out of their food. Traditionally, silk chef's hats are used for this purpose. A rain hat has a wide rim to keep the rain out of the wearer's face. Some traditional types of hat such as the Mexican sombrero also serve this purpose.
There are also the full range of helmets. There are also hats that are worn for protection from the cold. These include many varieties of fur hats, and also the Canadian tuque.Tin foil hats are protective headgear of controversial utility, as the existence of any such threat has yet to be substantiated.
Hats are also an article of fashion; the formal man's black silk top hat was formerly an indispensable portion of the suit, and women's hats have, over the years, attained a fantastic number of shapes ranging from immense confections to no more than a few bits of cloth and decorations piled on top of the head. Recently, the hat as an article of formal wear has fallen out of fashion, though some kinds of hats other than baseball caps may be included in young people's subcultural fashions.
A number of hats are used for religious purposes. Observant Jewish men wear yarmulkes, small cloth skull-caps, because they believe the head should be covered in the presence of God. Some Jewish men wear yarmulkes at all times, others in the synagogue.Similar to the yarmulke is the zucchetto worn by Roman Catholic clergy. Other forms of apostolic head-gear include the mitre, biretta, tasselled cardinal's hat, and the papal tiara.
Male Sikhs are required to wear turbans. See also the fez (clothing).The term red hat when used within the Roman Catholic Church refers to the appointment of a Cardinal, a senior Prince of the Church who is a member of the electoral college that chooses the Pope. A person on being appointed to the cardinalate is said to have received the red hat or cardinal's biretta.
Jewelry :-A number of jewels, including the crown, coronet, and tiara, have evolved from the hat.
Men who wear hats would typically take them off in a Christian church, but not in a Jewish synagogue. This points to a difference in philosophy but not motive. In the Christian tradition, removing a hat is a sign of respect, making oneself more humble or vulnerable, much like bowing or kneeling. This is as if to say, "I acknowledge that you are more powerful than I am, I make myself vulnerable to show I pose no threat to you and respect your power."
In the Jewish tradition, the idea is also to show respect for the superior authority of God. Wearing a keepah or yarmulka means the wearer is acknowledging the vast gulf of power, wisdom, and authority that separates God from mankind. It is the opposite of hubris (to think oneself better than God) to wear a yarmulka. There is a common phrase that explains this, saying that 'there's always something above you' if you're wearing a yarmulka, helping you remember you're human and God is infinite.
In Islamic etiquette, wearing headgear is perfectly permissible while saying prayers at a mosque  (http://www.albalagh.net/qa/cap_praying.shtml).
Civilian rules are probably similar to military ones. In the military, there are very specific rules about when and where to wear a hat (also known as a 'cover'). Hats are to be worn only outside, and this includes buildings as well as ships. Removing one's hat is also a form of a salute.
General guidelines are that hats should and can be removed as a form of showing respect to someone deceased, when a national anthem is played, while eating, and at other such occasions.The hat can be "tipped" (briefly removed, or tilted forward) as a greeting. Women usually do not take off their hats in these situations, but take their hats off in their own homes.