The speeches occur in Act 3, sc. 3 shortly after the play that Hamlet had contrived for the players to perfom enacting the way in which, according to the ghost of King Hamlet, Claudius killed his brother. Claudius's reaction is proof to Hamlet that the ghost told him the truth. Hamlet passes the chapel and notes that Claudius is alone in there. Claudius, while in the chapel, confesses his sins. He admits (to no human ear) that he killed his brother. He realizes that praying may not do him much good since he still reaps the benefits of his crime: the crown and Gertrude. He appears to be truly sorry for killing King Hamlet, but he's not sorry for what he's gained. Hamlet comes in unseen by Claudius. He hasn't heard Claudius's words. He knows he has an opportunity to kill Claudius, thus fulfilling his father's ghost request to get vengeance, but he doesn't want to let Claudius be in the act of praying and possibly receiving forgiveness because that would enable Claudius to go to heaven. Hamlet says that his father was killed without being given the chance to repent his sins. Apparently, King Hamlet had some noteworthy sins because Hamlet doesn't think his father's chances of getting to heaven are good without repentance. He doesn't want Claudius to have the chance for heaven when his own father was denied that chance. Hamlet wants to catch Claudius sinning so that he goes to hell.