The primary universe, also known as the prime reality, is the original continuity of the Star Trek universe, as opposed to any alternate universes or timelines, such as the mirror universe or the altered timeline of the 2009 motion picture.
Through crossover events, it seems that the universes of DC Comics' Legion reality and Marvel Comics' X-Men reality are separate realities from the Star Trek primary universe. In particular, the Legion characters shown were specifically from DC Comics before the 1985 Crisis on Infinite Earths, when the Legion's existence was wiped out retroactively, being replaced with a combined parallel universe that was similar but not identical.
It has been hinted that the Star Trek universe might be linked with numerous other science fiction franchises in numerous sources, however, none of these hints were part of a deliberate attempt to license a crossover, so might not be taken as solid ties. For example, in TOS comic: "The Haunting of the Enterprise!", Spock mentions historical records indicating that vampires did in fact occur on Earth, and mentions a historical anecdote mentioning several characters from Bram Stoker's Dracula as being real people, and describes a series of events from a Marvel Dracula comic that took place in the Marvel reality described above. Although this technically contradicts the above where the histories are separate, the Dracula reference was published by Marvel but was not part of a deliberate attempt to cross their franchise with Star Trek.