Regarding Hamlet and Macbeth by William Shakespeare, I need help to better understand how Macbeth and Hamlet are tragic heroes...
...because I struggle with understanding Shakespeare. Can you help, please?
In the two Shakespeare plays you mention, both protagonists suffer from hubris: they attempt to rise above their stations in life.
Hamlet plays God when he attempts to determine Claudius's eternal life. He refuses to kill Claudius while he thinks (incorrectly) that Claudius is confessing his sins, thereby purifying his soul. Hamlet doesn't want to send Claudius to heaven. Salvation is God's business, however, not Hamlet's. This is hubris on Hamlet's part, and his actions result in the destruction of numerous bystanders and himself.
Macbeth also tries to improve his station in life. To become king, he assassinates King Duncan. To create a dynasty with his own heirs, he orders the killings of Banquo and Fleance. To maintain his power he orders the slaughter of Macduff's family. He was a loyal thane, but that wasn't enough. He tries to rise above his station in life and thereby leads to his own downfall. This, at its heart, is hubris.
Hamlet and Macbeth are comparable and similar in this respect. Their personalities or character flaws lead to their downfalls. This is one element of a tragic figure. Their contrasts, or differences, of course, are far more numerous that their similarities. I'll leave those to you. But their similarity--their hubris--unites them as tragic figures.
Just a little advice: first, to better understand Shakespeare, I find it easiest to ignore the order in which he places the words. He is writing poetically, often in metered writing so that he is trying to give many of his lines a beat or rhythm. By switching up the syntax (word order), it's easier to understand the Bard's writing. Some of his most famous soliloquies, however, are exceptional because of their rhythm and rhyme, so once you understand them, then I would read for the pleasure of Shakespeare's mastery of the English language.
Secondly, don't hesitate to get a translation of the plays you are reading. Many of them are available here at eNotes, in parallel text, which means it's Shakespeare's English on the left, and in the right column, the modern translation to match what Shakespeare's characters are saying.
In terms of your topic, in Shakespeare's plays, Macbeth and Hamlet, regarding Hamlet and Macbeth as tragic heroes, all tragic heroes have the same characteristics (based on Aristotle's definition of a tragic hero):
he must be a great man
he must die
his death must be his own fault due to his character flaw
Both Hamlet and Macbeth have major character flaws.
Hamlet's flaw is his indecision. He is supposed to avenge his father's murder, but takes forever to do so. Of course, he is torn between several things: is the Ghost truly his father? Or is the Ghost a specter sent by the powers of darkness to lead him to eternal damnation by killing an innocent king? (Remember, the Elizabethans—of which Shakespeare was one—believed that God ordained who would be king, and to act against the king was to go against God...this is an important piece of information for Macbeth, as well.) Finally, when Hamlet has the chance to kill Claudius, he does not do so because it looks like Claudius is praying. (Ironically, Claudius is actually unable to pray.)
Macbeth's character flaw, as he himself points out, is his vaulting ambition.
I have no spur
To prick the sides of my intent, but only
Vaulting ambition, which o'erleaps itself,
And falls on th'other. . . . (I, vi, 25-28)
Macbeth wants to be king and decides, with his wife's help, that he will kill Duncan, who is his King, his cousin, and his guest: three things the Elizabethans would have counted unwaveringly against him. Once Macbeth gets over his initial repulsion for killing, his ambition takes over and it seems he cannot stop himself. He even goes as far as killing Macduff's entire family because Macduff has turned his back on Macbeth. (Ironically, where Lady Macbeth was fine with the plan to begin with, their bloodthirsty behavior haunts her until she loses her sanity and takes her own life.)
As to the characteristics of the tragic hero, both men are great: Macbeth is a decorated soldier, Hamlet a good and loving son. Both men die. And the cause of each man's death can be traced directly to his character flaw.