What Hamlet means when he says "The play's the thing/ Wherein I'll catch the conscience of the King" is that he will watch the king during the play and see if he reacts guilty or not.
Prince Hamlet decides to take action after his father's ghost reveals him that he was murdered by Hamlet's uncle, Claudius. In order to make sure that what the ghost told him is true, Hamlet draws up a plan and directs a play that presents the way in which King Hamlet was murdered, according to the words of his father's ghost. In that way, Hamlet tries to find out if Claudius is truly guilty by detecting signs of guilt in his uncle's face and paying attention to his reaction while he is watching the play.