Queen Gertrude says this in Act IV, scene i, regarding Hamlet's murder of Polonius earlier in Act III.
The quote suggests the duality of Hamlet's actions. Hamlet seems crazy, but he's really trying to enact revenge. Hamlet seems split between madness and sanity, revenge and duty, action and passivity, and sea and wind.
Two forces of nature seem present in Hamlet's character. Indeed, he seems to be battling his own will and the instructions of his father's Ghost. Hamlet seems split between the Christian belief of forgiveness and the pagan concept of revenge.
Just as the sea and the wind battle each other and erode the coast, so too does Hamlet wage war regardless of consequence. He kills and feels no remorse. Hamlet thinks Claudius is behind the arras, but it is Polonius instead. Yet, Hamlet does not bemoan his death. In short, Hamlet has tasted blood, and his nature is now a force of nature: blood will beget more blood. He will kill more: Rosencrantz and Guildenstern, Claudius, and Laertes. After this, Hamlet becomes an agent of revenge, a force of nature that the Ghost, his father's spirit, would be proud of.
Gertrude is not the best judge of character. She thinks her son is mad. She thinks her husband is legitimate. She is blind to the two most important men in her life. She may also be blind to the forces of nature. It is ironic that she says this. She will continue to say silly things like this until she tastes the poisoned wine intended for her son, planted by her husband.
In sum, this quote attests to the blindness of Gertrude and the "appearance vs. reality" theme in the play.
When Gertrude says this, she is talking Claudius, her husband. She is describing to him what has just happened with Hamlet and Polonius. She is telling Claudius that Hamlet has just killed Polonius. She says that, when Hamlet did it, he was crazy. She uses this simile to show just how out of control he is -- he is like a storm with the wind and the waves competing to see which is stronger.
By saying this, Gertrude seems to be trying to protect her son. She is saying he is crazy so he will not be in trouble for murdering Polonius. She also doesn't tell Claudius that Hamlet had thought/hoped it was Claudius he had killed.