The Lovers Must Overcome Obstacles
Viola wants to marry Duke Orsino, but she can't because Orsino is in lust with Olivia. Plus, Orsino thinks Viola is a boy, "Cesario."
Also, Olivia wants "Cesario," but she can't have "him" because "Cesario" is Viola, who loves Orsino.
Malvolio believes that Olivia loves him... but it's a trick set by Maria.
Everyone's in love, but things are a mess. That's the "obstacle" part.
Here's how love "overcomes" obstacles: When Sebastian shows up, Olivia has no problem transferring her lust for "Cesario" to Viola's look-alike brother. (Yeah, it's ridiculous but so what?) Sebastian's a bachelor so, hey, why not marry Olivia? Now that Viola knows her brother's alive, she can reveal her identity, which is a good thing because now the Duke can marry her. That was easy.