To some extent, Malvolio acts as the antagonist to many of the play's characters. He is extremely critical and judgmental of Maria, Sirs Toby and Andrew, and even Feste. But at the same time, many of the play's characters dislike and are critical of Malvolio, which turns him into just as much of a victim as he is an antagonist and creates the conflict of the play's subplot.
The first character we see Malvolio being critical of is Feste. In the first act, Olivia is angered because Feste has been away from her household for so long and demands that Feste be taken away when he shows up again, Feste soothes her by making a witticism about her prolonged grief over her brother. When Olivia asks Malvolio if he thinks Feste's foolery improves over time, Malvolio responds by insulting Feste, even stating he is surprised that Olivia finds Feste so amusing, as we see in Malvolio's lines:
I marvel your ladyship takes delight in such a barren rascal; I saw him put down the other day with an ordinary fool that has no more brain than a stone. (I.v.76-78)
Later, Malvolio further insults Maria and Sirs Andrew and Toby. Maria is trying to quiet down Sirs Andrew and Toby who are acting a bit wild late at night due to drunkenness, but Malvolio interprets her behavior as encouraging them, and he comes out to scold the lot of them, accusing them of being mad and having "no wit, manners, nor honesty" (II.iii.81-82). Malvolio's behavior angers Maria so much that he becomes not only the antagonist but also the victim of Maria's prank. In addition, Malvolio creates conflict between himself and the other characters, and that conflict culminates in Malvolio being victimized by Maria's prank and locked up in a dark room as a madman. Hence, we see that Malvolio's function is as the antagonist, which leads to the climax of the subplot.
Malvolio’s part in the play
is a backdrop situation separate from the main story. He brings a
level of both humour and sympathy to the play. Malvolio is one of the
main sources of humour in Twelfth Night. In the later part of the
play a different side of him is exposed.
Malvolio is Olivia’s steward and his job is to manage Olivia’s house;
he is her chief servant. It’s a very responsible job that he takes
very seriously. He enjoys telling people what to do.