The Duke has been telling Viola, who loves him but is keeping her love a secret, how women don't know anything about what it is to love, unlike men. Viola's response has been to tell him about a woman she knows of who loved a man but who didn't tell him about it. This scene is dripping with dramatic irony, for she actually tells him about herself here. The simile is about how concealment is like a bud that destroys a rose (young woman):
She never told her love,
But let concealment, like a worm i' the bud,
Feed on her damask cheek: she pined in thought,
And with a green and yellow melancholy
She sat like patience on a monument,
Smiling at grief. Was not this love indeed?
Viola goes on to say that men say more and swear more but that their words are more show than substance. Viola is the silent one, "pining in thought" (an allusion to Echo), who allows concealment and inaction to grow to the point where it might eventually destroy her, and yet, for all her grief at her unrequited love, she smiles. She smiles because she loves truly and deeply and is willing to sacrifice herself for love.