The play is a tragedy, specifically a revenge play. Its full title, The Tragedy of Hamlet, Prince of Denmark, signals that it is a tragic drama, and its plot follows a prince whose father's ghost commands him to avenge his father's murder.
It fits the revenge-play genre because Hamlet learns that his uncle Claudius murdered King Hamlet, took the throne, and married Gertrude. The ghost’s demand for revenge sets the action in motion, but Hamlet spends much of the play delaying, trying to test Claudius’s guilt, and wrestling with the moral and religious consequences of killing him.
It is also a tragedy because the hero’s flaws and circumstances lead to destruction rather than restoration. Hamlet eventually kills Claudius, but only after Polonius, Ophelia, Gertrude, Laertes, Rosencrantz, Guildenstern, Claudius, and Hamlet himself are either dead or doomed. The ending, with Fortinbras arriving to find the Danish court destroyed, rounds out the play’s tragic plot.
Hamlet is best described as a Renaissance tragic play and revenge tragedy. Shakespeare uses a familiar revenge plot to focus on hesitation, conscience, corruption, and the terrible costs of both action and delay.