In Twelfth Night, the shipwrecked woman who disguises herself as a man is Viola.
After surviving a shipwreck off the coast of Illyria, Viola believes that her twin brother Sebastian has drowned. To protect herself and find employment, she disguises herself as a young man named Cesario and enters the service of Duke Orsino. Orsino sends Cesario to court Olivia on his behalf, but Olivia falls in love with Cesario, while Viola falls in love with Orsino.
This disguise creates the play’s famous romantic triangle and drives much of its mistaken identity. Sebastian is Viola’s twin brother, not the woman in disguise. Olivia is the countess who becomes attracted to Cesario, while Maria is Olivia’s gentlewoman and part of the subplot involving Malvolio.
Twelfth Night was probably written around 1601–1602 and was first documented in performance on 2 February 1602, at Candlemas. Shakespeare drew plot elements from Barnabe Rich’s story “Of Apollonius and Silla,” itself based on a tale by Matteo Bandello. The play was later included in the 1623 First Folio.