The Spanish Tragedy, also known as Hieronimo is Mad Again, is widely considered to be the first fully-formed Elizabethan stage drama, rivaled only by Christopher Marlowe's Tamburlaine. As such, The Spanish Tragedy influenced a number of playwrights who collaborated with or followed Thomas Kyd. The most prominent of these figures was William Shakespeare, whose 1600 play Hamlet draws on a number of themes, tropes, and theatrical conventions of Kyd's earlier play.
The most explicit similarity between The Spanish Tragedy and what is likely the most famous English drama of all time, Hamlet, is their genre: both plays are revenge tragedies, meaning that the desire for revenge is what drives their plots. In Hamlet, the murder that must be avenged occurs before the action of the play proper (when the King's brother, Hamlet's uncle, murders Hamlet's father). In The Spanish Tragedy, it is both Don Andrea's death before the play and Horatio's death during the play that inspire revenge narratives for both Bel-Imperia and Hieronimo.
Hamlet also draws on The Spanish Tragedy through its incorporation of the supernatural in the form of the ghost of the late king. The Spanish Tragedy, of course, features the ghost of Don Andrea as part of the Chorus along with the personified figure of Revenge. Many have argued that, because of the novelty of The Spanish Tragedy during its early performances, this personification of the play's central theme was necessary in order to orient audiences to what was, at the time, unfamiliar theatrical territory. By the time theater-goers got to Hamlet, the need for such explicit representation was obsolete; the simple presence of the ghost in the first scene would have alerted the audience that the play would revolve around betrayal and revenge.
Finally, both plays feature a meta-theatrical dramatization of the play-within-a-play, used to trap and serve justice to the alleged villains and ultimately suggesting the importance of the theater more generally. These myriad similarities between The Spanish Tragedy and Hamlet have led many to propose Thomas Kyd as one of the authors of the Ur-Hamlet (a hypothetical "original" version of the play ) that Shakespeare allegedly consulted while writing his own play.