Hamlet has been concerned since he saw the ghost with the issue of appearance versus reality: who tells the truth and who lies? Is the ghost actually his dead father? Who among the courtiers in a corrupt court tells the truth? Is his uncle really a murderer?
It also weighs heavily on Hamlet, who is depressed and having suicidal ideation, that he feels paralyzed. He is terribly grieved over his father's death and feels the loss acutely. If the ghost is telling the truth, he feels the burden of needing to avenge his father's murder.
When the traveling players come, Hamlet watches the First Player as he acts the part of Hecuba, the wife of King Priam, mourning her husband's death with tears and body language that communicate deep grief. Hamlet wonders that someone merely acting a part can so convincingly convey strong emotion. Hamlet asks,
What’s Hecuba to him or he to HecubaThat he should weep for her?
What would he [the player would] doHad he the motive and the cue for passionThat I have? He would drown the stage with tearsAnd cleave the general ear with horrid speech,Make mad the guilty and appall the free . . .
Hamlet watches the actor (or Leading Player) deliver a monologue in which he, the actor, becomes so emotionally invested that his performance is incredibly believable, including moments of rage and even ending in tears. Later, Hamlet compares himself to this actor in his famous "O what a rogue and peasant slave am I" soliloquy. He basically beats himself up for not having the same amount of passion about his real life situation as the actor has for a pretend situation. Hamlet is desperately mad at himself for not having taken any action yet to avenge his father.