Duke Orsino sends love letters to Olivia, but Olivia loves Cesario, believing her to be a man. But Viola (Cesario) loves Duke Orsino.
Then Sir Andrew comes into the scene to challenge Duke Orsino to a duel. The winner gets viola.
Then Sebastian enters the scene, and everyone is confused.
THE END
Then Olivia enters amid the confusion and, thinking that Sebastion is Cesario, asks him to marry her.
Later, at Sebastian and Olivia's house, the confusion has lifted, when they find out that Cesario was really Viola. Duke Orsino realizes that he loved Viola and asked her to marry him.