In most Shakespeare plays, characters of high social status speak in blank verse (i.e. unrhymed iambic pentameter), while peasants and servants speak in prose.
This rule doesn't completely apply to Twelfth Night. Sir Toby Belch and Sir Andrew Aguecheek are both noblemen, but they speak almost entirely in prose and mainly associate with servants who speak the same way. This stylistic choice helps to illustrate that, despite their noble birth, their nature is vulgar. Sir Toby's speech is also filled with crude puns and obscene double-entendres, which sets him apart from other aristocratic characters who use sophisticated figurative language.
The style of Twelfth Night is also interesting because characters change their way of speaking depending on whom they are addressing. In Act 1, Scene 5, Viola speaks in prose when Maria is present but switches to verse the moment she is alone with Olivia, indicating that she views Olivia as more deserving of respect. Olivia initially speaks to Viola/Cesario in prose, but as the scene progresses and she begins to fall in love, she too begins to speak in verse, showing that she has stopped thinking of Cesario as Orsino's servant and instead regards him as an equal.
Characters like Orsino, Olivia, and Viola, who speak mainly in blank verse, will sometimes dip into rhymed verse when they grow especially passionate. For example, while most of Orsino's declarations of his love for Olivia are unrhymed, his speech patterns undergo a shift in Act 5, Scene 1 when he believes that Cesario has betrayed him:
Orsino: Come, boy, with me. My thoughts are ripe in
I’ll sacrifice the lamb that I do love
To spite a raven’s heart within a dove.
In response, Viola, who has spent the entire scene speaking in blank verse, also descends into rhyme:
Viola: More than I love these eyes, more than my life,
More by all mores than e’er I shall love wife.
If I do feign, you witnesses above,
Punish my life for tainting of my love.
No longer able to keep her love for Orsino a secret, Viola has shifted into the style of romantic poetry. And although Orsino has always claimed to love Viola, the fact that his words begin to rhyme in this moment suggests that his feelings for Cesario are far more profound.
At one point, Orsino, Viola, and Olivia begin to speak in such rapid harmony that they actually finish one another's rhymes and meters:
Olivia: Whither, my lord?—Cesario, husband, stay.
Olivia: Ay, husband. Can he that deny?
Orsino: Her husband, sirrah?
Viola: No, my lord, not I.
This exchange highlights both the passion these characters feel and also how in sync they are with one another. Although Olivia and Orsino are both furious with Cesario, their manner of speaking illustrates the intimacy of their relationships with him.