The episode covers the boys' first day of fourth grade. The three previous seasons of the program featured the main characters in the 3rd grade with Mr. Garrison in the role of teacher. This grade-change plot device allowed the writers to introduce a new teacher, Ms. Choksondik, and also make a new opening sequence in which the show was said to be "Faster", have "more explosions" and that "You love it".
School's back, and the class is now in fourth grade. The boys figure that it won't be too hard, considering that third grade was a cakewalk, and that their teacher is a woman fresh from Denver, so she should be easy to intimidate. Unfortunately they - and the rest of the class, with the possible exception of Cartman - quickly realize that their teacher, Ms. Choksondik, isn't as tolerant or patient as Mr. Garrison was (although Kenny's first observation is that "her titties are fucking huge"). She rules with an iron fist, and everyone starts to wish that they could return to third grade - Cartman even sings a musical number (Third Grade Memories), reducing Clyde to tears. Everyone decides to time travel back in time to third grade.
They enlist two Star Trek Nerds, who constantly debate hypothetical things, such as the merits of the two theories of time travel from Star Trek and whether the original series of Trek had 72 or 73 episodes. They are initially reluctant on the basis that the kids may very well not make it back, but they agree to help when Stan tells them that they aren't planning on a return journey. Work begins on constructing a time machine out of Timmy's wheelchair.
Principal Victoria, Chef and Mr. Mackey meet in the office, since the Principal is being driven insane by Choksondik - partly due to her not wearing a bra, which Chef sees no problem with - until Choksondik walks in to discuss the fourth graders - she considers them to be among the worst she has ever taught. The Principal says that they did fairly well in third grade - then lets slip that she doesn't actually know which one is mentally handicapped. Choksondik asks to talk to their third grade teacher - however, nobody likes to talk about what happened to Garrison since he was fired. Choksondik leaves - and Chef spews a little.
The nerds follow the fourth graders into school the next day to test the time travel device. Only Wendy is skeptical about it. The nerds say that the wormhole created by the device will cut through space-time by one year, leaving the kids at the beginning of third grade. Choksondik walks in, and Cartman announces that they have alternative plans to passing their homework forward (which they didn't do anyway). The time travel machine is powered up, and while sufficient speed is reached, Timmy ends up breaking through the wall at the front of the class. The nerds admit they didn't think it would actually work, and everyone (much to Choksondik's dismay) heads out to help Timmy, whose wheelchair is packed with hi-tech stuff.
The boys catch up with Timmy and yell at him to stop - the nerds then tell him not to, on the basis that an instability in the magnetic field could cause the chair to blow up. Neither can Timmy dismount the wheelchair - if his speed drops below 5 mph or he gets off, the chair blows up. A SWAT rescue attempt begins, but the chair's battery has only 20 minutes of juice left in it.
Choksondik returns to the Principal, demanding to speak to Mr. Garrison. The Principal, Mackey and Chef admit that Garrison had a nervous breakdown after his romance novels were nominated for gay book awards, and retreated to the mountains. Choksondik vows to find him.
The SWAT team enlist Kenny to help with the rescue - they put him on a trolley which is sent down the road, despite Kenny not actually knowing what he was doing or being ready. After saying "hi" to the other boys, the trolley catches on a manhole and flips, with Kenny being face down on the asphalt. The cable that attaches him to the SWAT truck then drags him along the road, grinding his body against the road. Coming to a stop in front of the others half-liquefied, Stan says "Well, who didn't see that coming?" The helicopter crew fail to defuse the device, but instead of blowing up, Timmy actually does manage time travel - much to the nerds' amazement.
Choksondik tracks Garrison (and Mr. Hat) to a cave on top of a mountain, who has gone paranoid that people are accusing him of homosexuality. Choksondik explains that she needs his help to learn how to deal with the fourth graders. Garrison is initially reluctant, but eventually does so - for $200.
Stan asks the nerds to build a second time machine but, since one moved out after a fight over how many episodes of Star Trek there were, it is impossible. Stan comments angrily on leaving that Timmy is probably living it out in third grade right now (he is in fact in dinosaur times). They track down the other nerd who refuses to live in a world of 72 Star Treks and slams the door in their faces (Butters then points out that the two parter episode, "The Menagerie", was originally a single episode anyway, so there were 72 episodes). Stan manages to convince the nerd by saying he could travel back through time to ask the creators of Star Trek how many episodes there were.
Garrison's training of Choksondik progresses, including teaching her to take up the kids on offers suck as "Suck my balls!" in order to defeat them, since they would not actually present them. He eventually takes Choksondik to the "Tree of Insight", where Choksondik expects to have to face her personal demons. Inside, though, there is nothing, and she realises that she alone can fight the kids. She leaves through a back door. Garrison follows her in, since she was taking so long, and ends up facing his gay side. The gay side of Garrison convinces the "real" Garrison to admit that he is gay - who instantly feels better and willing to return to society.
Choksondik returns to class, where the Mark 2 time machine has been built - this time involving a duck that is duct-taped to a microwave oven. Cartman announces it again and - due to the nerds getting into another argument, this time about Battlestar Galactica - a time rift opens. Cartman, before entering, tells Choksondik to suck his balls. Choksondik tells him to whip them out. Stan realises that this is what Garrison would have said, and Choksondik convinces everyone to stay in fourth grade on the basis that there is always something up ahead - the students agree with this, and Kyle makes them realize that third grade wasn't really all that great, and everyone gets mad at Cartman for making them think otherwise. Timmy reappears in the time rift with an admiral hat, a robotic arm, a spiked mace and an Enola Gay bumper sticker, among other things, after travelling all through time.
Garrison reappears in the Principal's office, openly admitting that he's gay. He asks for his old third grade teacher job back, but the Principal says that they don't hire gays - much to Garrison's annoyance, Chef and Mackey laugh at the joke.