On their first day of high school, two boys, Ryan (Troy Gentile) and Wade (Nate Hartley), are embarrassed by the fact that they happen to wear the same shirt. Wade sticks up for a smaller fellow geek, Emmit Oosterhaus (David Dorfman), who is being shoved into a locker by bullies Filkins (Alex Frost) and Ronnie (Josh Peck). As a result the violent bullies Filkins and Ronnie terrorizes all three at every chance they get.
The trio complain to the principal (Stephen Root), but their concerns fall upon deaf ears. Filkins is furious that the boys have squealed on him, and even chases them with a car, apparently to murder them. Wade suggests to his friends that they pool their money together to hire a bodyguard who can protect them. They place an ad on the Internet, and select Drillbit Taylor (Owen Wilson) out of several candidates, mainly because he is the cheapest.
Taylor pretends to be a martial arts master and mercenary, but in reality he is just a homeless beggar who sleeps under a picnic table, showers on a public beach (nude in the open, visible from the highway), and eats out of a dumpster. His real intention of becoming their bodyguard is to rob them and get enough money to go to Canada and start living there, where he believes he will be paid to accept land.
After complaints from the boys that he is not there when they need him (especially after Filkins punched Wade in the face after Ryan humiliated him in a public rap battle) the boys lend him a suit of one of their fathers,and he accompanies them to school. There he is taken by the school staff to be a substitute teacher, falls in love with pretty teacher Lisa (Leslie Mann), and decides to actually start working as such.
He starts really liking the boys and decides to try to really defend them, and teach them also to defend themselves. After Taylor's criminal friends steal a lot from Wade's house, Taylor fights them and returns everything to the house. One morning Ronnie's mother drives him to school, and they see Taylor taking his shower at the beach; the mother knows he is a beggar. Ronnie tells this to Filkins, who now knows that Taylor is not a real teacher, and punches him.
Taylor is forced to confess to the boys that his real name is Bob and he went A.W.O.L. from the U.S. Army after a few days of service. The trio fire him and demand their belongings back. The parents soon find out and take things up with the principal. As a result, Taylor is a wanted man and things with Filkins are still not settled. After a confrontation with Filkins, who spoiled Wade's chance to ask out Brooke (Valerie Tian), an Asian girl who he met on day one, Ryan and Wade, who have gained self-confidence, challenge Filkins to a fight.
He agrees if they come to his house for the fight (Filkins is an emancipated minor and owns his own house, which is why they couldn't call his parents). During the fight Emmit (who previously abandoned Ryan and Wade) shows up for the last part of the fight delivering many small punches to Filkins' leg and briefly putting him in a submission hold. At this point, Ronnie also shows up and punches Emmit, leaving Filkins free to beat up Wade.
After Wade takes several punches to the face and stomach, Drillbit shows up and continues to take punches from Filkins until he finds out that Filkins is no longer a minor, after which Drillbit displays considerable skill and delivers several kicks and punches to Filkin's face. During the group's celebration, the police show up and Drillbit, a U.S. Army deserter, is forced to flee. Filkins runs out with a samurai sword and throws it at Ryan, Wade and Emmett, which Drillbit stops just in time by catching it (giving him a gash on his hand and slicing his pinky 1/2 off, so the remains is a stub).
Filkins is then arrested and taken back to his parents in Hong Kong, and Drillbit taken to the hospital, then prison. Three weeks later, Taylor is out of prison and celebrating with the boys and Lisa. After the credits, Taylor is seen working in the school as a nurse. A boy walks into the room with a bloody nose, and Taylor asks him for names, assuring him that the bully will be dealt with.