Hamlet says “Frailty, thy name is woman!” in Act 1, Scene 2. He says it during his first soliloquy, after Claudius and Gertrude leave him alone. Hamlet is grieving his father’s death and is disgusted that his mother, Gertrude, has married Claudius so soon afterward. He sees her quick remarriage as a sign of moral weakness and turns his anger at Gertrude into a harsh generalization about women.
The line comes as Hamlet dwells on how little time has passed since Gertrude followed King Hamlet’s funeral procession. His bitterness is sharpened by the fact that Claudius is now his stepfather as well as his uncle. The phrase helps establish Hamlet’s deep resentment toward Gertrude and foreshadows the contemptuous way he later treats both Gertrude and Ophelia.