Headgear was any article of clothing worn on a person's head.
Bajoran hats[]

Vedek Winn's hat
Bajoran vedeks and kais, such as Winn Adami, wore special types of hats. (Star Trek: Deep Space Nine)
Headdress[]

Nog wearing a Starfleet headdress in the Ferengi style
A headdress was a piece of material worn around the back of a head. It was normally seen being worn by Ferengi, and as part of the Ferengi uniform.
The recreated Ferengi sciences officer aboard Terrasphere 8 was wearing a headdress matching his uniform color. (VOY: "In the Flesh")
A turban was a type of headdress worn by some Humans in the 20th century, as well as in the 2380s. (TOS: "Space Seed"; LD: "Second Contact", et al.)
Miscellaneous headgear[]
Seltin Rakal and some other female inhabitants of Meridian wore pieces of fabric on their heads. (DS9: "Meridian")