If thou dost marry, I'll give thee this plague for
thy dowry: be thou as chaste as ice, as pure as
snow, thou shalt not escape calumny. Get thee to a
nunnery, go: farewell. Or, if thou wilt needs
marry, marry a fool; for wise men know well enough
what monsters you make of them. To a nunnery, go,
and quickly too. Farewell.

In Act III, scene i, the tone is very emotional, as Hamlet has just finished delivering a moving soliloquy in which he questions his life, and if it is worth living. The Danish prince does not realize that his new stepfather and Polonius are hiding, listening to Hamlet to figure out if he is "mad." Ophelia, Hamlet's love, as her father and the new king have ordered, comes in and attempts to return tokens of affection that Hamlet has previously given her. Genuinely hurt, Hamlet's mien turns noticeably sarcastic and cruel, almost as a defense mechanism; upon realizing that he and Ophelia are being spied upon, he lashes out derisively at her. In an attempt to hurt her as she has hurt him, he says that he never really loved her. In his opinion, all men are dishonest, and Hamlet tells Ophelia to do to a "nunnery." To a naive eye, it would appear that Hamlet is wishing her to seek refuge from men that would wish to use her, in a convent. In reality, in Elizabethan humor, "nunnery" is another word for a house of ill repute. Ironically, in telling Ophelia that he knows that she has remained chaste, he mocks her for her virtue. He goes on to comment that any man who marries is a fool, because women bring out the worst in any man.