Everything written is as good as it is dramatic. It need not declare itself in form, but it is drama or nothing. - Robert Frost
Drama is based on conflict. Conflict creates problems for one or more characters, and we tend to emphasize with one character, such as Hamlet, because of his problem and not because of his character. This empathy is a natural part of human nature. We are psychologically and emotionally programmed to want to help other people if they are in trouble. Some people take advantage of this natural human tendency. Panhandlers are a good example. But there are many others, including all those people who call us on the phone and ask us to contribute to some organization which is probably running a scam out of a "boiler room."
In Shakespeare's Hamlet, there are only two characters who face both internal and external conflicts. These are, quite appropriately, Hamlet and Claudius. Hamlet is engaged in an ongoing psychological conflict with Claudius and at the same time fighting an internal conflict between his duty to revenge his father and his reluctance to commit murder and regicide. Claudius, for his part, is afraid of Hamlet because the younger man is not only the rightful heir to the throne, but he is infinitely better educated and more intelligent than the crafty, cunning King. At the same time, Claudius is eaten up with guilt because of the terrible crime he has committed, as he reveals in his futile attempt to pray and elsewhere in asides. Some famous psychologist, probably Freud, said that guilt is nothing but fear of punishment; so Claudius is suffering from fear which he takes pains to hide from everyone. His heavy drinking is not for pleasure but to deaden his memories and his internal panic. He would really be panicked if he knew that Hamlet had been talking to his father's ghost and knew all about his wickedness.
When two characters are involved in a conflict, there should be something tangible that the conflict is about. This used to be called the "bone of contention." In Hollywood parlance it is called the "MacGuffin." In Hamlet the MacGuffin can only be the royal crown. Claudius wants to keep it. Hamlet knows that he could obtain it if he handled the situation adroitly. He is the legitimate heir. The people love him. Polonius would certainly be on his side because the old man would love to have Hamlet marry Ophelia and make his daughter queen. But if Hamlet simply murders Claudius, that could seriously hurt his chances of being elected the new king. What he needs to do is to expose Claudius as the murderer and usurper-- and then kill him.
Claudius is terribly suspicious of Hamlet. He keeps him a virtual prisoner at Elsinore and spies on him, trying to find out if his nephew is plotting against him. He uses Polonius, Ophelia, Rosencrantz, Guildenstern, Gertrude, and no doubt many servants and courtiers to spy on Hamlet and report to him. In one of Shakespeare's most beautiful metaphors Claudius says of Hamlet:
There's something in his soul,
O'er which his melancholy sits on brood,
And I do doubt the hatch and the disclose
Will be some danger
In the conflict between Claudius and Hamlet, we naturally empathize with Hamlet because we know Claudius to be a murderer and a villain. But Hamlet has huge, complicated internal and external problems. This is how Shakespeare gets us involved in the drama. We are hoping to see Hamlet win and Claudius lose.