He is often portrayed as the main antagonist.
Malvolio is defined as a kind of Puritan and wishes his world to be completely free of human sin, yet he behaves very foolishly against his unstoic nature when he believes that Olivia loves him. This leads to major conflicts with characters such as Sir Toby Belch, Sir Andrew Aguecheek, and Maria, mistress of the household.
Much of the play's humour comes from Maria, Feste, Toby Belch, and Andrew Aguecheek tormenting Malvolio with drinking, joking, and singing. Later in the play, Maria devises a way to have revenge upon Malvolio, and proposes it to Sir Toby, Sir Andrew and Feste. Maria composes a love letter in Olivia's handwriting, and leaves it so Malvolio will find it. Beforehand, Malvolio had been wishing to marry Olivia.