Hosiery, also known as stockings or tights, were very common garments worn throughout the galaxy by a variety of species. Hosiery was designed to be skin tight and encase the wearer most often from the waist or legs down to their feet. (TOS: "Shore Leave", "A Taste of Armageddon")
Hosiery were typically designed as sheer garments worn over one's legs. Thicker versions of hosiery were known as tights. Hosiery could be worn with a "panty", in which case they were typically referred to as pantyhose or with a garter, in which case they were known as stockings. Hosiery were typically considered a female garment, but could apply to men, in which case the garments were sometimes known as socks.
In 2364, Beverly Crusher straightened the seams on her stockings just prior to entering the Dixon Hill holodeck program. The holographic character Jessica Bradley also wore stockings when she was waiting for Dixon Hill in his office. (TNG: "The Big Goodbye")
During the 2260s, the Starfleet uniforms of the time incorporated hosiery into the standard uniform for female personnel. Female Starfleet personnel could wear black hosiery underneath a skirt type uniform or with standard black trousers, the same as male personnel. (TOS: "Charlie X"). Civilian attire of the time also displayed hosiery as a common form of clothing, worn by both women and girls. (TOS: "Court Martial")
Hosiery survived as a clothing item well into the 24th century and was commonly worn by women as civilian attire, but no longer as part of the Starfleet uniform, although a "skant" outfit did exist as late as 2365 which was apparently worn both bare legged and with hosiery. (TNG: "Encounter at Farpoint")
By the 2370s, hosiery was not commonly worn, but the fashion of wearing skin tight bodysuits appears to have been somewhat popular. Seven of Nine wore one such suit throughout her time on the USS Voyager, but by the 2390s, she no longer wore this type of clothing. (VOY: "Day of Honor"; PIC: "Stardust City Rag")
Use by alien races
Some alien races, such as the culture on Eminiar VII, wore hosiery as thick black tights by both men and women. This trend also appears to have been popular on the asteroid ship Yonada. (TOS: "A Taste of Armageddon", "For the World is Hollow and I Have Touched the Sky")