Viola survives a dramatic ship wreck (off-stage) and doesn't know if her twin brother, Sebastian, has survived. She disguises herself as "Cesario" and gets a job as Duke Orsino's page. Duke Orsino believes he's in love with Olivia and relentlessly pursues her. Olivia, who mourns her brother's death, has sworn off romantic relationships and cloisters herself in her room.
Disguised as "Cesario," Viola falls in love with her boss, Orsino, who loves Olivia. When Olivia meets "Cesario," she falls in love with the "boy," who doesn't return her favors. Olivia then marries Sebastian (Viola's twin brother), thinking she has married "Cesario." When the Duke hears "Cesario" has married Olivia, he's devastated and disowns "him." Meanwhile, Malvolio has been tricked into thinking that Olivia loves him. His erratic behavior lands him in a dark room, where Toby and company hold him captive and let others believe Malvolio is crazy.
When Sebastian and "Cesario" finally meet and the case of mistaken identities is cleared up, Olivia and Sebastian can go about their lives as man and wife. Viola then reveals her identity and gets engaged to Duke Orsino. The truth about Malvolio's odd behavior and imprisonment are brought to light when Malvolio is freed from the dark room and confronts Olivia, who explains she never loved him. Malvolio swears revenge but, as Booker points out, he's never much of a threat to begin with. Everyone (except for Malvolio) is pleased as punch and Viola's wedding to Orsino is imminent – pending her change of wardrobe, that is.