A cup or mug was a hand-held container for consuming liquids. It could be produced of different material. A coffee mug was a cup utilized for the purpose of holding coffee or other hot beverages. (TNG: "The Ensigns of Command"; DS9: "One Little Ship") A teacup was a cup meant for tea. (VOY: "Year of Hell") A shot glass, for example, was a cup made of glass that was used for consuming shots of alcoholic beverages. (Star Trek Into Darkness)
Cups were in use in the mess hall aboard Enterprise NX-01. The drink dispenser provided these cups. (ENT: "The Andorian Incident", "Breaking the Ice", "Fortunate Son")
When offered tea by the Akaali apothecary Riaan, Jonathan Archer replied that he'd love some cup. (ENT: "Civilization")
In 2153, Captain Jonathan Archer took a cup out of the serving case in the mess hall when he ordered a coffee from the drink dispenser. (ENT: "Regeneration")
A thermos bottle often included a cup which was fitted atop the bottle. (ENT: "Regeneration")
In the alternate reality 2259, when James T. Kirk and Khan Noonien Singh were preparing to space jump from the USS Enterprise to the USS Vengeance, Montgomery Scott told Kirk that the doorway into the Vengeance was very small, and that making a jump successfully would be like "jumping from a moving car, off a bridge, and into a shot glass." (Star Trek Into Darkness)
In 2368, Alexander Rozhenko sculpted a cup out of clay which was destroyed when a block of clay fell onto it. (TNG: "Imaginary Friend")
In an alternate 2374, one of Kathryn Janeway's antique cups in her ready room fell off her desk and broke when a Krenim warship attacked the USS Voyager (VOY: "Year of Hell")
24th century coffee mugs in use aboard Starfleet ships featured the Starfleet emblem. (DS9: "Meridian")
Regarding his diagnosis of Irumodic Syndrome in 2401, Jack Crusher remarked, "I can either wallow in self-pity, or I can be like those Japanese teacups, which get put back together with melted gold. Or in my case bourbon." (PIC: "The Bounty")
This is a real art form called kintsugi.