Earth-Prime first appeared in 1968, within the pages of The Flash #179. It was the “real” world – where no superheroes existed, and Batman, Wonder Woman, et al, existed solely as comic book characters.
About 17 years later, DC Comics Presents retconned Earth-Prime to have a super-powered resident named Superboy, who would join Crisis on Infinite Earths that same year to fight the Anti-Monitor and later be shuffled off to Alexander Luthor’s utopia alongside Earth-2 Superman and Earth-2 Lois Lane (and, well, we all know how that turned out).
Part of Crisis on Infinite Earth‘s overall design was to make Superman the sole survivor of Krypton’s destruction. This meant Supergirl had to die. It also meant Superboy had to be erased from existence as well, so that Clark Kent could, as an adult, make his debut as a hero while preventing a space plane from crashing into Metropolis in 1986’s Man of Steel #1.
This caused a significant continuity problem: one of DC’s enduring and popular super-teams, the Legion of Super-Heroes, had, as part of its origin, the founding teenage members (Cosmic Boy, Saturn Girl, and Lightning Lad) creating the Legion out of admiration for Superman’s adventures as a teenaged Superboy. So, in theory, no more Superboy should’ve meant no more Legion.
Writers Paul Levitz and John Byrne came up with a workaround: the Time Trapper, in his continued efforts to screw with Legionnaire’s minds, created a “pocket universe” and populated it with exactly one superhero – Superboy – and rigged it so that whenever the Legionnaires travelled back in time, they were actually being shuttled off to the Pocket Universe rather than Earth-1:
The Superboy from Earth-Pri…I mean the Pocket Universe…made his post-Crisis debut in “The Greatest Hero of Them All,” a storyline that ran through Legion of Super-Heroes, Action Comics, and Superman in 1987. (Comixology lists it as “Superman: Future Shock” for those buying their comics digitally). It involves time travel, Superman’s first encounter with the Legion, and a nifty idea/retcon that might’ve actually worked had anyone ever been interested in using it aside from Levitz and Byrne.
There was also the Supergirl factor. While the Superboy/Legion stories of years past were explained by the Pocket Universe’s existence, Superman’s cousin had also spent a significant amount of time as a Legionnaire in the 30th century. Yet there was no Pocket Universe Supergirl to fill that role. Except there totally was a Pocket Universe Supergirl, introduced a year after “The Greatest Hero of Them All,” first in one-page teases in various Superman books, and then full-on in “The Supergirl Saga,” which found Supes travelling to the Pocket Universe to help save Earth-Pri…er, the Pocket Universe Earth…from destruction.
Superman arrives after the planet’s Superboy is long dead, and Pocket Universe Lex Luthor, a benevolent, long-tressed redheaded scientist, has created a Supergirl (a concept post-Crisis Superman was unfamiliar with) out of a gooey purple protoplasm and modelled her after his deceased paramour Lana Lang. Pocket Universe Earth has been ravaged by Pocket Universe General Zod, Pocket Universe Faora, and Pocket Universe Quex-Ul, up to their old (new?) tricks.
“The Supergirl Saga,” aside from being fun, interesting, and frequently-confusing, is notable for its conclusion: after Zod, Faora, and Quex-Ul murder literally everyone on the planet aside from Superman and Matrix Supergirl, Superman totally kills the shit out of them. On purpose. Take note, everyone who claimed the ending of Zack Snyder’s Man of Steel was inaccurate and unprecedented: Aside from making Superman a murderer, the whole Legion/Supergirl problem was now solved! Except it wasn’t. Matrix Supergirl didn’t fill in the gaps left by the deceased pre-Crisis Kara Zor-El in post-Legion continuity. That job went to Laurel Gand, a.k.a. Andromeda, introduced in the pages of Keith Giffen and T&M Bierbaum’s controversial “Five Years Later” run on Legion of Super-Heroes in 1990. Laurel Gand is distant relative to Lar Gand, a.k.a Mon-El (Superman’s Big Brother), and both are Daxamites, Kryptonian descendants with similar powers. So now the deal was that Lar Gand and Laurel Gand occupied the “Superboy” and “Supergirl” parts of Legion history (and Laurel Gand would have a flirtation/romance with Braniac 5, similar to pre-Crisis Supergirl).
A decade later, the real (old?) Kara Zor-El Supergirl would arrive and Infinite Crisis would clean up the whole mess by re-introducing the multiverse and having Supergirl…get into a cosmic accident that split her into two, sending half of her 1000 years into the future while the other half stayed behind in the 21st century. But let’s get back to Earth-Prime, which, post-Infinite Crisis, now existed again.
As did Superboy-Prime. Except instead of being an earnest do-gooder, as depicted pre-Crisis on Infinite Earths, the new, post-Infinite Crisis Superboy-Prime was now an evil prick, driven murderously insane by DC’s continuity problems (understandable). The Jon Lane Kent of his day, Superboy-Prime was a petulant, entitled jerk. Writers mined this for comedy rather than drama, so it was hard to take him seriously, but a few good storylines came out of this: the aforementioned Infinite Crisis, Legion of 3 Worlds, and Superboy-Prime’s two-issue Adventure Comics crossover with Blackest Night.
At the time of Legion of 3 Worlds, the Legion had their pre-/post-Crisis on Infinite Earths version (which would eventually become the dreaded 5YL version), the post-Zero Hour version meant to clean up the mess caused by the 5YL version, and the 2004 “Threeboot” version, later joined by Supergirl post-Infinite Crisis. Legion of 3 Worlds explained that all of these version existed but came from different realities: the Threeboot team, specifically, was told they were from Earth-Prime.
Alternate versions of established heroes offer a chance to see the road not taken: Kaine’s Scarlet Spider to Peter Parker’s Spider-Man, the Crime Syndicate of Earth-3 to Earth-1’s Justice League, Faith the Vampire Slayer versus Buffy. Back in the early ’90s, the Wally West Flash had an alternate-timeline counterpart in Walter West, who arrived in the mainstream DCU as part of “The Dark Flash Saga” to take the place of Wally (who Walter believed was dead) and get a second chance with his love Linda Park (who was dead in Walter West’s world).
Walter caused a bit of trouble, fell in love with crime scene investigator Angela Margolis, and learned he would destroy reality by staying in Wally’s world rather than his own. So he fled into hypertime and found himself in…
Earth-Prime? It’s not said outright, but it’s obviously meant to be Superboy-Prime’s turf, and having Walter West land there is a nice callback to The Flash #179.