(written from a Production point of view)
South Park is an animated show on Comedy Central that started in 1997. South Park has a number of Star Trek references:
Stan tells Jesus Christ "someone once said 'Don't try to be a great man, just be a man.'" When Jesus asks who said it, Stan replies "you did, Jesus." When Kyle asks if he said that in the Bible, Stan replies "I dunno. I saw it on Star Trek." (It is in fact from Star Trek: First Contact.)
"Conjoined Fetus Lady"
Cartman comments Chef's obsession with winning the dodgeball tournament with "Captain Ahab has to get his whale, huh?", a reference to Star Trek: First Contact, which is actually a reference to Moby Dick.
"City on the Edge of Forever" (aka "Flashbacks")
In this 1998 episode, named after a famous Star Trek episode (TOS: "The City on the Edge of Forever"), the kid who just happens to be wearing the red shirt complete with arrowhead insignia, is the one chosen to scout the area around the schoolbus (which is teetering on the edge of a cliff). He promptly gets eaten by the monster. (See also: redshirt)
"Roger Ebert Should Lay Off the Fatty Foods"
This episode, also from 1998, takes many of the plot points from the TOS episode "Dagger of the Mind". The crazed director of the Tantalus V. Observatory (also named Dr. Adams), armed with his own neural neutralizer, hypnotizes some of the children, and Mr. Garrison, in his torture chair. Additionally, Mr. Mackey, the school counselor, uses a mind meld to get information from a child named Van Gelder, who escaped from the observatory. The Latin phrase above the main archway is also a translation of "Beam Me Up, Scotty!" Also, during a TV news coverage about the events, the reporter is "a 34-year old Asian man who looks strikingly similar to Ricardo Montalban".
This episode, again from 1998, parodies the TOS episode "Mirror, Mirror". The boys find an alternate, evil universe. The evil Cartman from the mirror universe - actually a good Cartman, because the Cartman from the "standard" universe is the evil one - has a goatee, which is a requirement for those from a mirror universe, since everyone from the evil universe has one. (The gag of "Evil Cartman" actually being good may also be a reference to TOS: "The Alternative Factor" where the "Anti" Lazarus was actually good.) Officer Barbrady also shows Stan's mother Sharon, a collection of photos depicting people who have recently gone missing in the neighborhood - one of them is a live-action photograph of a bare chested William Shatner. The ending of the episode, when Stan and Kyle have to figure out which Cartman to return to the mirror universe, is similar to the scene in Star Trek VI: The Undiscovered Country where the commandant at Rura Penthe has Kirk and Martia posing as Kirk both telling him to shoot the other as well as the dilemma imposed upon Spock in "Whom Gods Destroy".
In a joke reminiscent of the first Star Trek reference on the show, Stan tells his father Randy that the Bible says "The needs of the many outweigh the needs of the few." When Kyle again corrects him and attributes the quote to Star Trek II: The Wrath of Khan, Stan says "The Bible, Wrath of Khan, what's the difference?"
"Hooked on Monkey Fonics"
The discussion about love and public school between Kyle and Rebecca is almost word-for-word the discussion between Captain Kirk and Shahna from "The Gamesters of Triskelion", complete with the musical theme for Ruth, composed by Gerald Fried, playing in the background.
"Staarvin' Marvin in Space"
The home world of the Marklar is said to be in the Alpha Ceti VI galaxy, which is a reference to Ceti Alpha VI, the planet Ceti Alpha V was mistaken for in Star Trek II: The Wrath of Khan. Several Star Trek sound effects can also be heard throughout the episode.
"The Tooth Fairy's Tats 2000"
As he watches the start of Sarque du Son Blue, a bored Eric Cartman tells himself "we've reached fag factor 5, captain."
"Something You Can Do with Your Finger"
The scene with Randy smashing the glass and screaming "No!!!", along with the direct vocals used for it, were taken from the scene in Star Trek: First Contact, in which Picard exclaims 'NO!' and then proceeds to break a nearby glass display.
When the boys plan to travel back in time to return to third grade, they seek the help of "those Star Trek dorks" to help them. The two dorks wear shirts that say "Resistance is Futile!" and "Yeah! Resistance is Futile!" and give two possible theories about how they might travel through time, one of which is the "Mr. Spock Theory", meaning a slingshot around the sun could propel one back in time (TOS: "Tomorrow is Yesterday"), and the other being the "Lieutenant Commander Data Theory" in which a magnetic vibration could do the same (TNG: "Time's Arrow"). One of them also claims that "four times the Enterprise traveled back in time and four times they almost didn't make it back." (referring to "The Naked Time", "Tomorrow is Yesterday", "Assignment: Earth", and Star Trek IV: The Voyage Home) When their time machine malfunctions, one of them says "this has never happened in the any of the 72 original Star Trek episodes", while his friend maintains that there were 73 episodes (there are in fact 79 episodes, however, Matt Stone and Trey Parker intentionally made the mistake to infuriate other Star Trek fans). Butters later explains that the two don't realize that "The Menagerie, Part I" was originally the pilot (named "The Cage") and later got split up into two episodes. Stan also suggests that the two build another time machine to travel back and ask Gene Roddenberry exactly how many episodes there are.
"Wacky Molestation Adventure"
This one, from 2000, winds up being a parody of the TOS episode "Miri". All the adults have been arrested – the children have accused all of them of molestation. The children take over the town, inventing a twisted new society with disturbing rites like the one they call "Carousel." (like many other non-Star Trek plot points of this episode a reference to 1976 science fiction film Logan's Run) When two visitors wander into South Park and ask where the adults are, the kids don't know what they mean. "Oh, you mean the birthgivers." "That was in the Before time, in the long long ago." And when the male adult visitor realizes what has happened, he tells the children where they have gone wrong, changes their mind, and sets them on the path to restoring the town... by giving a long, pleading, show-stopping speech in the lurching, breathless classic style of William Shatner.
"Here Comes the Neighborhood"
When Token brings a DVD of " The Lion King " rather than a VHS copy, Cartman quips "Let me take this disc up to the Enterprise and see if Captain Kirk can decrypt it."
In this episode, Maury Povich is under siege by an army of physically disfigured freaks. In order to gain information about the mob, a man with a Vulcan haircut and blue shirt (but without the Enterprise mission patch) looks into a device which looks suspiciously like a viewer from the Enterprise (NCC-1701) and reports on the characteristics of the crowd.
"Fun With Veal"
The boys demand that "the guy who plays Worf on Star Trek" drive them and their liberated infant cattle to an airport which will take them to Mexico. They also want Michael Dorn to drive the truck in full Klingon make-up. When Cartman is riding along with Mr. Dorn, he demands that he refer to him as "captain." He also orders him to kill the police officers, but Dorn refuses, causing Cartman to complain "some Goddamned Klingon you are." The real Michael Dorn later admitted in an interview on StarTrek.com that he is a fan of South Park and wished that creators Matt Stone and Trey Parker had asked him to do a guest spot.
"The Passion of the Jew"
In the beginning of the episode, Cartman, Kenny, Stan, and Kyle are playing "away team" using Cartman's mom's new van as a shuttlecraft. Cartman plays the captain, while he refers to the others as "First Officer Stan", "Engineer Kenny" and "Vulcan Jew Kyle." When he orders the others (except Kyle) to investigate the surface of the planet, Kyle protests and demands to go along, to which Cartman begrudgingly agrees, but warns Kyle not to hold him responsible for anything that might happen on the planet's surface. Later, when Stan and Kenny meet Mel Gibson and say that they want their money back after seeing The Passion of The Christ, he goes crazy and begins to scream "Q'apla".
The boys' preschool teacher, Miss Claridge, suffers extreme burns and is confined to a wheelchair just like Captain Pike's, where she can only speak by beeping once for yes and twice for no.
"Cartoon Wars, Part I"
In one of the Family Guy cutaways, Peter Griffin plays Captain and Tenille songs with Captain Kirk.
"Cartoon Wars, Part II"
When the FOX Network executive gives the order to pull a Family Guy episode from airing, he gives the destruct code of the Enterprise from "Let That Be Your Last Battlefield".
"Go God Go XIII"
At the end of the episode, Cartman, after spending some time in the future, experiences temporal integration with his present self.
Kirk and Khan are residents of Imaginationland.
Several references in this episode. First, Stan and Randy's Pinewood Derby car breaks the warp barrier, which alerts an alien species. This is obviously alluding to Star Trek: First Contact, which is later mentioned by name as inspiration. At the end of the episode, Earth itself is put into a giant Tholian web, blocking them off from the universe, as punishment for Randy's and Earth's lying to the aliens.
As Gerald Broflovski is trying to rescue Kyle from Apple, the Geniuses go through a series of magical rituals to attempt to ascertain his whereabouts, finally revealing that Gerald can void Kyle's iTunes agreement by setting up a family account. When he finally agrees to do so, the spokesperson for the Geniuses shouts "kal-if-fee!" The scene where the Geniuses go through, point by point, the terms of the Apple agreement with Gerald, resembles the location of Koon-ut-kal-if-fee from "Amok Time".
The titular Funnybot is a creation of German engineering that resembles a cross between Nomad and a Dalek from Doctor Who. After Funnybot decides that annihilating the human race was the "ultimate joke" and proceeds to hijack Earth's nuclear arsenal, Jimmy Vulmer introduces a paradox (in the form of a "comedy award") to Funnybot, in order to disable Funnybot, similar to how Nomad was neutralized.
South Park: Bigger, Longer and Uncut
The climax of this feature-length film based on the series features Satan throwing his abusive lover, Saddam Hussein, into a fissure filled with molten lava while shouting "I have had ENOUGH of YOU!", an obvious reference to Star Trek III: The Search for Spock.