Hamlet engages a group of travelling actors to perform a reenactment of a murder strikingly similar to how King Hamlet was killed. During this staged performance, Hamlet observes Claudius' reaction closely.
As the scene unfolds, Claudius is deeply shaken and disturbed by the performance. His expressions, physical reactions, and nervous demeanor give away his guilt, leading Hamlet to conclude that Claudius Indeed ordered the murder of his father. This moment provides the confirmation Hamlet sought and fuels his determination to avenge his father's death.
Although the play-within-a-play scene is the most iconic moment of revelation, Hamlet uses several other strategies to gather supporting evidence that point to Claudius' guilt throughout the play. He engages in conversations, uses soliloquies to introspect and explore his thoughts, and relies on other characters to observe Claudius' reactions carefully.