Viola Hastings (Amanda Bynes) is a high school soccer player who learns that the girls' team at her school, Cornwall, is being cut. After her request to join the boys' team is refused, she finds a way to play for Cornwall's rival Illyria.
Viola's twin brother Sebastian, whom she resembles physically, is supposed to enter Illyria as a new student. However, he plans to visit London secretly to enter a contest with his rock band. Sebastian asks Viola to cover for him by telling the school that he is sick and each of their parents (who are divorced) that he is staying with the other.
Viola instead decides to pass herself off as Sebastian and join the boys' soccer team at Illyria. She hopes to beat the Cornwall team and humiliate her goalie ex-boyfriend Justin (Robert Hoffman). With the help of her friends Paul (Jonathan Sadowski), Kia (Amanda Crew), and Yvonne (Jessica Lucas), Viola becomes "Sebastian".
At Illyria, Viola's roommate is Duke Orsino (Channing Tatum), a good-looking striker on the soccer team. Kia and Yvonne agree to help Viola make her alter ego seem popular by pretending to be in love with "Sebastian". Viola also publicly breaks up with the real Sebastian's girlfriend, Monique. Duke and his friends are impressed, but Viola's soccer skills are still not good enough to make first string. It looks like Viola may not be able to play in the game against Cornwall after all.
After spending so much time with him, Viola realizes that she has fallen in love with Duke. However, Duke is only interested in Viola's lab partner, Olivia (Laura Ramsey). In exchange for Viola's help in getting Olivia's attention, Duke agrees to put in extra soccer practice time with her. The practice pays off when Coach Dinklage (Vinnie Jones) promotes Viola to first string.
By this time, Olivia has developed a crush on "Sebastian". Since "Sebastian" isn't interested in her, Olivia decides to go out with Duke to make him jealous. Meanwhile, Monique and her friend Malcolm find out Viola's secret identity.
The plot is complicated when the real Sebastian returns from London early. When he arrives at Illyria, Olivia runs up and kisses him. Duke sees this and thinks his roommate has betrayed him. He kicks Viola out of their room.
On the day of the big game, Monique and Malcolm reveal the truth about Viola to Principal Gold. But because Viola has overslept, the real Sebastian winds up on the field playing in what should be his sister's spot. Principal Gold stops the game but Sebastian proves that he really is a boy yanking off his shorts and exposing his penis. At half time, Viola explains the situation to Sebastian and they switch places again.
Duke is still angry with "Sebastian" and refuses to pass the ball to Viola. She tries to explain that she really is a girl, finally convincing Duke and everyone else by showing them her breasts. The coach agrees to let Viola keep playing anyway. Illyria wins the game on a penalty kick when Viola scores a goal by tricking her ex-boyfriend Justin.
Everyone at Illyria rejoices after the victory, except for Duke who is hurt at Viola's deception. She invites Duke to her debutante ball, where they reconcile. As the movie ends, Viola is seen playing on Illyria's soccer team.