The film is She's the Man (2006), starring Amanda Bynes as Viola Hastings. It's a modern adaptation of Shakespeare's Twelfth Night.
When Viola's twin brother Sebastian leaves for London, she disguises herself as him to attend his elite boarding school, Illyria Prep. Her goals: prove she can play on the boys' soccer team (after her girls' team is cut) and win the heart of her roommate, Duke (Channing Tatum)—who thinks she's a guy.
The query mentioned a 2000 release; 2006 is the correct year. The 2000s saw several gender-disguise comedies (Motocrossed, Just One of the Guys), but She's the Man is the definitive all-boys-school entry.
Bynes' physical comedy, the sharp supporting cast (David Cross, Julie Hagerty, Vinnie Jones), and the clever Shakespearean parallels (Malvolio = Malcolm, Feste = the tarantula) elevate it above typical teen fare.