A costume was a garment whose purpose was to give one the appearance of someone or something they were not. A costume could be worn to blend in around the natives of a planet (TOS: "A Private Little War") or to enhance one's experience within a holoprogram. (DS9: "Afterimage") It could also be worn for humorous effect, such as a gorilla suit. (Star Trek Generations)
In 2364, Q appeared in a variety of costumes to the crew of the USS Enterprise-D, eliciting Jean-Luc Picard to frustratingly cry, "What is this need of yours for costumes, Q? Have you no identity of your own?" (TNG: "Hide And Q")
In 2372, entering the USS Voyager's holodeck in her Starfleet uniform, Kathryn Janeway, playing the role of "Lucille Davenport", explained her strange attire to Lord Burleigh as a costume. (VOY: "Persistence of Vision")
In 2399, Kestra Troi-Riker disclosed that the outfit she was wearing was essentially just a costume for a game that she and her brother created when they were younger. (PIC: "Nepenthe")