After surviving a shipwreck and being separated from her twin brother (Sebastian), Viola arrives in Illyria, where she dresses up as a boy named "Cesario" and becomes Duke Orsino's page. Her first job as "Cesario" is to play go-between. She'll have to convince Olivia (who has sworn off all men while she mourns the death of her brother) to marry Duke Orsino.
While trying to convince Olivia to hook up with the Duke, Viola (disguised as "Cesario") realizes that Olivia has a crush on "Cesario." (Guess Olivia's no longer torn up about her dead brother.) Plus, Viola admits that she (Viola) is totally in love with her boss, Duke Orsino, who has no idea that she's really a girl. Meanwhile, Viola's twin brother isn't dead after all and has arrived in Illyria, where he gets into a fight and marries Olivia, who thinks he is "Cesario." Viola (still disguised as "Cesario") is in hot water when she's accused of beating up Toby and Aguecheek, marrying Olivia, and being a traitor to Duke Orsino.
When Viola comes face to face with Sebastian, everyone realizes that "Cesario" isn't the one who got into a street fight and married Olivia. Viola (still disguised as "Cesario") then reveals that that she is Sebastian's twin sister, which means that she can marry Duke Orsino and live happily ever after. Orsino and Viola get engaged, but Viola can't change out of her man-clothes because the sea captain is holding her dress for her. Orsino says that's OK – he'll just continue to call Viola "boy" and "Cesario" until Viola looks more like a girl. So, while the play promises its audience a very tidy heterosexual union, we're left with a homoerotic image of Orsino and "Cesario."