A universal translator is a device common to many science fiction works, especially on television. First described in Murray Leinster's 1945 novella "First Contact", the translator's purpose is to offer an instant translation of any language. Technology companies are striving to develop a practical "universal" translator for common use.
As a convention, it is used to remove the problem of translating between alien languages, unless that problem is essential to the plot. To translate a new language in every episode when a new species or culture is encountered would consume time (especially when most of these shows have a half-hour or one-hour format) normally allotted for plot development and would potentially, across many episodes, become repetitive to the point of annoyance. Occasionally, alien races can extrapolate the rules of English from little speech and then immediately be fluent in it, making the translator unnecessary.
While a universal translator seems unlikely, due to the apparent need for telepathy, scientists continue to work towards similar real-world technologies involving small numbers of known languages. See speech recognition, machine translation and speech synthesis for discussions of real-world natural language processing technologies.
As a rule, a universal translator is instantaneous, but if that language has never been recorded, there is sometimes a time delay until the translator can properly work out a translation, as is true of Star Trek. Some writers seek greater plausibility by instead having computer translation that requires collecting a database of the new language, often by listening to radio transmissions.
The existence of a universal translator is sometimes problematic in film and television productions from a logical perspective (for example, aliens who still speak English when no universal translator is in evidence and all characters appear to hear the appropriately translated speech instead of the original speech, the ability to speak in the language when direct translation is possible), and requires some suspension of disbelief when characters' mouths move in sync with the translated words and not the original language; nonetheless, it removes the need for cumbersome and potentially extensive subtitles, and it eliminates the rather unlikely supposition that every other race in the galaxy has gone to the trouble of learning English.