This question has already been asked and answered many times here on eNotes. Here is a link for you: http://www.enotes.com/hamlet/q-and-a/how-hamlet-revenge-tragedy-4815
It is true that Hamlet is basically a revenge-play,and yet it differs from a revenge-play. The basic elements of a revenge-play may be enumerated as under :
- It deals with some crime ,usually murder.
- The ghost of the dead appears to reveal the the identity of the criminal.
- The task of avenging the murder is laid upon the shoulders of a close friend or relative.
- This task is accepted as something sacred.
- The avenger faces many difficulties and impediments in the performance of his task.
- Ultimately revenge is taken with terrible consequences to the avenger and the avenged.
- The play is full of violence and bloodshed, adultery and incest,thrilling fights, sensational horrors and other melodramatic elements.
- The language used is artificial and pompous and the style is flowery and grandiloquent.
It is clear that all the basic elements of a revenge-play are found in Shakespeare's Hamlet .The ghost of the late king of Denmark appears in full dress and armour and reveals the identity of the murderer, and the task of taking revenge is entrusted to Hamlet,the prince, who accepts it as a sacred duty.He encounters many difficulties in the performance of his task. Ultimately, he is successful in completing his task but in the process both the avenger and the avenged are killed. Plots and counter-plots,the treachery or friends, assumed and real madness, fighting and bloodshed, sensational events and other basic elements of a revenge-play are to be found in Hamlet, and so it may be called basically a revenge-play.