Twelfth Night is a story about transgression. Shakespeare plays with the themes of love, mistaken identity, and social class in this comedy. The play actually contains three plotlines that come together in the final scene. The plotlines are held together by the character of Feste, the Fool, who can cross social boundaries because of his exemption from behaving, the right of an "allowed Fool." The plotlines are as follows:
1. Viola, stranded on Illyria after a shipwreck and the loss of her twin Sebastian, is forced by her status as a single, unaccompanied woman, to disguise herself as a boy and work at Orsino's court. There she falls in love with Orsino but cannot reveal herself because of her deception. Orsino is in love with the Lady Olivia, who has also recently lost a brother. He sends Viola, in her disguise as the page Cesario, to woo Olivia. Olivia then falls in love with Cesario, unaware that "he" is "she."
2. Sebastian did not drown, but was saved by Antonio, who cares for him. He, too, is in Illyria, but does not know that his sister is alive. He and Antonio must part ways since Antonio is Orsino's enemy, but he does not want to leave Sebastian and follows him.
3. Toby, Olivia's relative, has brought Andrew, a "foolish knight" to woo her in hopes of being the financial beneficiary of their union. They are continually in trouble for drinking and partying at all hours in Olivia's house with the help of Maria, Olivia's gentlewoman. The steward Malvolio, who has delusions of marrying Olivia himself, threatens to expose them and they devise a plot to undo him, sending him to Olivia under the pretense that she has written him a letter.
Of course, all the characters finally come together and are unmasked at the end of the play. Orsino gets Viola; Sebastian gets Olivia, and Maria marries Sir Toby.