Malvolio finds a counterfeit letter written by Maria in order to make a fool out of him. She, Toby and Andrew don't like him because he is conceited and believes that he is a better man since he serves Olivia. So, Maria comes up with a plan to write an ambiguous letter in Olivia's handwriting to make Malvolio believe that Olivia loves him. Malvolio is in the middle of pretending to be Olivia's husband when he happens upon the letter and the other servants watch him.
Maria sets the letter up to suggest, but not explicitly to say, that its intended for someone whose name has the letters M, A, O, I. Foolishly, Malvolio deems his name worthy of those letters. The letter reads like a riddle with famous phrases like: "In my stars I am above thee, But be not afraid of greatness: some are born great, some achieve greatness, and some have greatness thrust upon 'em"(II.v.129-131). Here it seems to coax Malvolio into believing that his servant's status can be overcome by love if he simply steps up and shows that he is worthy of it. Having thus set him up, Maria writes that his yellow stockings and garters are things that he likes about him. With this, of course, she hopes to prompt him to trapse around in the stockings thinking he will be complimented and signify that he has read the letter and willing to be hers. Lastly, the final thing that he should do that will show her that he is interested in her is to smile more and remember to smile in her presence--something that is certainly uncharacteristic for Malvolio and will be received humorously.
Maria has set Malvolio up perfectly for criticism and laughter as he falls for the directions given in the letter that he finds on the ground.