(written from a Production point of view)
A teaser (also known as a cold open) is essentially the portion of an episode shown before the opening credits. As described by Michael and Denise Okuda, it is "a brief scene at the beginning of an episode, designed to make the viewer want to stay tuned." (ENT Season 3 DVD "Impulse" text commentary) Almost all episodes of The Original Series, The Next Generation, Deep Space Nine, Voyager, Enterprise, and Discovery begin with a teaser (exceptions are TNG: "Encounter at Farpoint" and DIS episodes "Magic to Make the Sanest Man Go Mad" and "Si Vis Pacem, Para Bellum") while Star Trek: The Animated Series does not. The teaser is usually one to two minutes long (or less), though can sometimes exceed five minutes. Examples of these longer teasers include TNG: "Booby Trap", TNG: "The Quality of Life", TNG: "Ship in a Bottle" and DS9: "A Time to Stand". Perhaps three of the longest teasers are TNG: "The Nth Degree", DS9: "If Wishes Were Horses" and VOY: "Deadlock", all clocking in at about seven minutes. The episode's title and production credits (guest stars, producers, writers and director) are typically held until the first segment after the opening titles (the lone exception is TNG: "Descent" in which the title and credits occur after a scene change within the teaser).
The following memorandum was written on 2 May 1966, as a supplement to the Writer-Director Information Guide for the original series, and was authored by Gene Roddenberry, describing the format of a typical episode:
a. Teaser, preferably three pages or less. Captain Kirk's Voice Over opens the show, briefly setting where we are and what's going on. This is usually followed by a short playing scene which ends with the Teaser "hook."
The "hook" of the teaser was some unexplained plot element that was alluded to in the teaser, which was intended to keep audiences interested enough in the show to dissuade them from changing stations while the titles roll. Star Trek writer David Gerrold, to tweak William Shatner on set, once told Shatner that he was writing a Star Trek episode in which Kirk lost his voice in the teaser (the hook), and didn't get it back until the tag.
Possibly the shortest teaser to appear in a Star Trek episode was from the Star Trek: Enterprise episode "Impulse". This scene, in which a deranged, screaming T'Pol is carried into sickbay and restrained by Archer and Phlox, clocks in at just over 18 seconds. The second shortest teaser may be the one from Star Trek: Voyager's "Scorpion". This teaser, which has the Borg saying their trademark "greeting" just prior to their destruction by Species 8472, lasts just under 20 seconds.