(covers information from several alternate timelines)
Sweat, or perspiration, was a liquid secretion produced by an individual's body for the purpose of expelling toxins and cooling one's body temperature. Sweat was a byproduct of vigorous exercise or exertion and could also be produced due to prolonged exposure to heat from an external source or as a response to strong emotions, such as fear.
Concerned that Worf was taking an upcoming game of Parrises squares too seriously, Riker told him it was just a game, saying, "You work up a sweat, you have a few laughs, and you make new friends." (TNG: "11001001")
Trying to convince Data that the Human population of Tau Cygna V should not be forced to evacuate their settlement to the Sheliak, Gosheven pointed out to him an aqueduct. When Data described it as "water," he replied that it was blood and sweat, the result of 90 years of combined effort. Data, however, was unmoved by the argument as he know that the Sheliak would use their powerful weapons to simply obliterate the people if they did not evacuate. (TNG: "The Ensigns of Command")
An upset Jadzia Dax suggested that a cold-footed Worf go back to sweating and bleeding in the holosuite with his friends and when he was finished, Benjamin Sisko could perform their wedding ceremony in his office. (DS9: "You Are Cordially Invited")
There were some individuals who might be capable of not breaking a sweat even while accomplishing a physically demanding task. For example, Julian Bashir played a Vulcan in the racquetball finals at Starfleet Medical Academy in his senior year. He later remarked on the Vulcan's stamina, saying he didn't think the man had even broken a sweat. (DS9: "Rivals") Similarly, Odo's assessment of Kurn's prowess as a Klingon warrior was that he could have disarmed a Boslic captain without breaking a sweat. (DS9: "Sons of Mogh")
Sweating as a medical symptom
Increased perspiration rate among males present in the briefing room was one of the symptoms reported by the USS Enterprise's computer when Kirk asked for sensor probe readings. This indicated, much to the embarrassment of Kirk and other men present at the time, that they were physically attracted to Mudd's women. (TOS: "Mudd's Women")
While under the influence of polywater intoxication, Hikaru Sulu remarked that he was "sweating like a bridegroom," though he wasn't sure whether it was caused by Psi 2000 or Tormolen's death. After Riley became ill with the polywater intoxication, he commented that he was sweating, too. Later, McCoy discovered that perspiration was the vector responsible for transmitting the illness. (TOS: "The Naked Time")
As established in a deleted scene from "The Menagerie, Part II", some trace of perspiration remains on anything anyone touches, and Human perspiration was mainly composed of sodium and calcium salts, whereas Vulcan sweat primarily consisted of copper salts. Vulcan perspiration was detected by Leonard McCoy and Montgomery Scott when they used a spectrograph beam to analyze computer tapes which Spock had touched while sabotaging the ship in order to lock it on a course to Talos IV.