During a surprise inspection of the Springfield Nuclear Power Plant from the Nuclear Regulatory Commission, Homer is placed in a test module van that simulates an emergency. He has no idea what to do and starts pressing buttons at random, somehow causing a nuclear meltdown even though there was no nuclear material inside the van. The NRC officials tell Mr. Burns that Homer's job requires college training in nuclear physics, and that he must go back to college to keep his job. Homer is rejected by every college he applies to, but Burns helps him get into Springfield University.
Homer ignores his studies and instead focuses on his preconceived notions of college life through adolescent movies and TV shows, such as the fictional The School of Hard Knockers, which stereotype college life as pranks, partying and rigid deans. He also insults the college dean, Dean Peterson, believing him to be a crusty, conservative administrator. In reality, Peterson relates well with the students and is relatively young. Homer acts like a know-it-all in class and is asked to demonstrate how a proton accelerator operates; consequently, he causes a nuclear meltdown in class. Dean Peterson takes him aside and recommends hiring a tutor. The tutors turn out to be three computer nerds named Benjamin, Doug, and Gary. The trio try to help Homer understand the material from his physics course, but he refuses to cooperate. Instead, he is determined to help them gain a social life by pulling a prank on rival college Springfield A&M University. The prank involves kidnapping the other school's mascot, a pig named Sir Oinks-a-lot. However, Homer causes the pig to become very ill after feeding it malt liquor, and Benjamin, Doug, and Gary are blamed for the incident.
Dean Peterson is forced to expel the nerds, and a remorseful Homer immediately invites them to move in with his family. However, their presence quickly disrupts the normal family routine, and Marge orders Homer to evict them, leading him to try to get the three re-admitted to the school. Homer's plan involves an attempt to run down Dean Peterson with his car, but have the nerds push Peterson out of the way at the last moment, with the hope that Peterson would readmit the nerds out of gratitude for saving his life. But the plan backfires, and Homer winds up running down the dean, seriously injuring him. At the hospital, Homer admits he was fully responsible for the pranks, and asks that Benjamin, Doug, and Gary be reinstated. The dean agrees to reinstate them and does not punish Homer, agreeing to forget everything that has happened. The nerds thank Homer for his assistance and move back into their old dormitory room.
Unfortunately, having been preoccupied with the nerd situation, Homer is not prepared for his final exam. The nerds say the only way to pass is to cram for the final exam, which they help him do. However, despite Homer's best attempts, he gets an F. To Homer's delight, the nerds hack into the school's student records and change his grade to an A+, but unfortunately, Marge finds out and forces Homer to take the course again in order to set a good example for Bart and Lisa. Homer's next college experience is shown during the end credits, with college clichés such as hazing by a fraternity, Telephone Booth Stuffing, a food fight, and finally his graduation ceremony where Homer flashes the audience.