Something is flawed in Orsino's approach to romance, and fixing that is the work of the comic action. In the opening scene, we learn that Orsino has been sending his serving men to deliver messages of love to Olivia, a newly bereaved woman. He is doing the best he can, sending Petrarchan missives of passion, but this is not the type of wooing that could win over Olivia, who has vowed to remain cloistered in grief for years. One senses that a subtext in both Orsino's and Olivia's plot line involves fear, for Orsino seems afraid to make himself personally vulnerable in love, and Olivia is afraid to claim a role for herself in the world after losing both her brother and father. Withdrawal seems an emotionally safe posture for both.
The fun of the comedy involves Orsino being attracted to Cesario but not quite understanding how or why. The indeterminacy of Cesario's gender leads Orsino to think that he will be equally appealing to Olivia:
It shall become thee well to act my woes;
She will attend it better in thy youth
Than in a nuncio’s of more grave aspect. (4.1)
Orsino is partly right—while Cesario stays on script with the overblown ornamentation of Orsino's address ("Most radiant, exquisite and unmatchable beauty"), Olivia can resist. However, when she speaks from her own passion, as she does in the "Willow Cabin" speech, Olivia falls hard for Cesario, causing Orsino's plan to backfire.
Cesario is the "in-between" figure, literally and figuratively, that causes both Orsino and Olivia to move past their self-protecting positions and engage in the world directly. Because his androgyny seems less threatening to both Orsino and to Olivia, Cesario can cause Illyria to become "unstuck" from its unproductive situations in act I.