Hamlet is a problem play because it raises so many questions about human nature and the nature of reality. It asks us to question what we know and how we know it, and to consider whether or not our perceptions are accurate.
Hamlet is a tragedy because it shows the dark side of human nature, and the tragic consequences that can result when we act on those impulses. We see murder, betrayal, revenge, madness—all because of Hamlet’s inability to reconcile his own desires with what he perceives as right and wrong.
Hamlet is both a problem play and a tragedy because it contains elements of both genres. It also contains elements of comedy—the gravediggers’ jokes are very funny—but overall it feels like tragedy: there is nothing happy about this story. It ends with Hamlet killing himself (and Laertes poisoning himself), Ophelia dying from grief over her father’s death at the hands of Hamlet’s uncle Claudius (who then marries Gertrude), Polonius being killed by Hamlet in his attempt to spy on him, Gertrude marrying Claudius after marrying him as part of her plan to send Hamlet away from court so that he doesn’t learn about her.