Your question refers to what we call dramatic irony, which is when one or more characters and/or the audience know something that other characters on the stage do not. Of course, this concept is particularly relevant for this excellent comedy, because so much of the humour and the plot is built around the way that Viola disguises herself as a male, Cesario, who is in turn confused for her twin brother Sebastian, who she thinks perished in the shipwreck that threw her up on the coast of Illyria.
The specific situations where this is referred to are numerous, but one that we could analyse is when Olivia first meets Cesario, who is entrusted with the task of delivering his master's love to her. However, much to the audience's amusement, we see that Olivia, far from becoming enamoured of Orsino, has fallen in love with the messenger instead:
'What is your parentage?'
'Above my fortunes, yet my state is well:
I am a gentleman.' I'll be sworn thou art;
Thy tongue, thy face, thy limbs, actions and spirit,
Do give thee five-fold blazon: not too fast:
We as the audience know what Olivia unfortunately does not: that Cesario, the man who has charmed her so greatly, is in fact no man, but a woman disguised as a man. Our privileged position of seeing all the action gives us superior knowledge in this instance.
"Twelfth Night" is probably Shakespeare's best (comedic) example of dramatic irony. The audience "knows more" than the characters right from the start. This question is way too broad to answer in a single paragraph, so bear with me with the following "situations" (As you phrase it):
- Viola dresses herself as a boy in order to work in the court of Duke Orsino. We (the audience) know that she is a girl, the Duke does not.
- When Viola, now disguised as Cesario, does Orsino's wooing of Olivia, the audience knows that she (Viola dressed as Cesario) is secretly in love with Orsino.
- Olivia falls in love with Cesario. The audience knows that Cesario is a "girl" - Viola in disguise.
- When Sebastian arrives on the island (Illyria), he is mistaken for Cesario, but the audience knows who he his.
- The audience knows that Olivia is marrying Sebastian and not Cesario.
- The entire misunderstanding between Olivia's servant, Malvolio, and his mistress Olivia, leaves the audience far more in the know than the characters.
I did not mention all of the situations in which the audience seems to have a better grasp on the reality of the play, than the characters themselves. You need to know the nuances of the play quite well to see how well Shakespeare manages to "dupe" the characters and sometimes even confuse the audience. The important thing to remember is: "Twelfth Night" (or "What you Will") is a comedy and the continuous dramatic irony is meant to enliven and enhance the comedic aspects of the play.
Refer to Charles and Mary Lamb's "Tales from Shakespeare" to get a very simply written version of this great play.