"According to the contract, no matter what else happens, I'm to be known as 'McLovin' forever."

With “Knocked Up” at the beginning and now “Superbad” at the end, we can officially declare this to have been the Summer of Judd Apatow.

Apatow, who wrote and directed “Knocked Up,” only produced “Superbad.” But he’s a mentor to the guys who wrote it, and a friend to many of the cast members — some of whom you’ll recognize from his films — and his influence can be felt in its humor. It’s raunchy, it’s vulgar, it’s hilarious … and it’s endearingly real.

The writers, Seth Rogen (the star of “Knocked Up”) and Evan Goldberg, have created a quasi-autobiographical 1980s-style teenage sex comedy with laughs and heart and, merciful heavens, more laughs. The jokes are often sexual, with references both highbrow and silly. You can dismiss the screenplay as having been written by juveniles, but there’s no denying they were smart juveniles.

The heroes, named for the writers, are Seth (Jonah Hill) and Evan (Michael Cera), both high school seniors with two weeks left until graduation. They dwell in the middle section of the teen social hierarchy, neither popular nor noticeably unpopular, picked on by a few jerks but mostly just ignored. They have a third friend, a hanger-on named Fogell (Christopher Mintz-Plasse), who is a source of embarrassment for being dorky. Seth and Evan are kind of dorky, too, but at least they know it. Fogell (or Faggell, as Seth inevitably calls him), his baby face contrasting with his hilariously delusional sexual ambitions, is blissfully unaware of just how awkward he is.

Seth is less responsible and more generally aggrieved by life than Evan; Evan is worried and earnest most of the time. Seth has the hots for a girl named Jules (Emma Stone) and wants to sleep with her before it’s too late. Evan likes Becca (Martha MacIsaac) and has similar aims, though he’s more subdued about it, maybe even respectful. Seth insists a party being thrown by Jules is their chance to get the girls drunk and take advantage of the opportunity. He reminds Evan what girls are always saying after wild parties, about getting wasted and sleeping with guys they shouldn’t have. “We could be that mistake!” he declares.

And so the movie unfolds over the course of 24 hours, with Evan, Seth, and Fogell attempting to procure liquor for Jules’ party, with things going wrong and Fogell winding up in the custody of two easy-going, affable cops (played by Seth Rogen and Bill Hader) for a while, and with Evan and Seth’s friendship being tested as they struggle to attend the party, find the girls, and advance their plans. The boys’ relationship is already strained by the news that they’ll be attending different colleges in the fall, and this fateful night is when their differences with one another — Evan’s timidity, Seth’s recklessness — come to a head.

The reason this and “Knocked Up” and “The 40-Year-Old Virgin” (Apatow’s previous film) strike such a chord with viewers is that the movies’ basic premises are plausible and the characters are believable — and yet they’re hysterically funny, too. Most movie characters who make us laugh don’t bear more than a passing resemblance to anyone we actually know. Often, it’s being larger-than-life that makes them so funny. But the people in Apatow’s movies seem just like our friends, only funnier. Evan and Seth talk the way my friends talked in high school, although perhaps with more swearing. (I tended to hang out with goody-goodies.)

That friendship between Seth and Evan, the heart of the movie, is brilliantly played by Jonah Hill and Michael Cera. Fans of “Arrested Development” will recall how good Michael Cera is at conveying awkward uncertainty, and it’s great to see him getting a major role in a major film. Likewise, this could be Hill’s breakout performance after being a consistently witty presence in smaller roles in other pictures. Some comedians are best in small doses, but Hill proves himself worthy of leading-man status, able to shoulder the bulk of “Superbad” without making us tired of him.

And yet somehow, I think nearly everything I’ve said so far will be irrelevant compared to what might be the film’s single greatest contribution: a fellow by the name of McLovin.

McLovin is Fogell, the third-wheel dweeb who is Evan and Seth’s friend without really being their equal. He’s the only one with a fake ID, though, so he’s the one recruited to buy the booze for Jules’ party. The problem? When he got the ID, he stupidly chose “McLovin” as his fake name. No first name; just McLovin. He is McLovin.

McLovin is what the cops call him, and it’s what everyone else winds up calling him, and it’s what the movie’s viewers will be calling themselves and each other for a long time to come. Irresistibly played by newcomer Christopher Mintz-Plasse, Fogell/McLovin doesn’t look like a movie star; he looks like a high school doofus, with a huge dopey grin and very little sense of propriety. He speaks with a slight lisp, and his voice cracks constantly. He believes he is smooth and smart despite being gawky and idiotic. He is a composite of about 20 percent of the boys you knew in school, and he immediately joins the pantheon of iconic teen-movie characters: There’s Jeff Spicoli, Duckie, Stifler, Booger, and now McLovin.

Guided by TV director Greg Mottola (Apatow’s “Undeclared,” “Arrested Development,” “The Comeback”), the film could be trimmed by a few minutes, probably in the side plot with the police officers. Yes, I realize that to cut any of that would mean to reduce McLovin’s screen time, and surely that is not desirable. But while most of the film is grounded in teenage reality, that tangent is madcap and far-fetched. You see that sort of nonsense in the cheesy teen movies, not the good ones.

Then again, maybe the point of “Superbad” is to recapture every aspect of the ’80s teen sex comedy, including the cheesy parts. Either way, the high-spirited adventures of Seth, Evan, and McLovin make this a truly exuberant, deliriously funny comedy. I’ve seen a few movies that were a little funnier, but I don’t think I’ve ever seen so many individual performances that brought more laughs than these three do.

A- (1 hr., 54 min.; R, pervasive harsh profanity and vulgarity, abundant crude sexual dialogue, brief sexuality, some nude drawings and photographs.)