In Homer's Iliad, the two main warriors on the Greek and Trojan sides are Achilles and Hector, respectively. Their differences are shaped by the various reasons that the Greeks and Trojans are involved in the war.
In Iliad 9, Achilles tells the embassy that Agamemnon sends to him that he (Achilles) has no quarrel with the Trojans. On the other hand, Hector is fighting on his own soil to save his own country.
Hector may also appear more compassionate than Achilles. Achilles is not portrayed as having a wife and children back in Greece. Hector, in contrast, is shown in Iliad 6 as the husband of Andromache and the father of Astyanax. Their tearful and emotionally charged encounter before Hector returns to the battlefield is an incredibly poignant moment in the epic.
As for their shortcomings, both Achilles and Hector exhibit a great deal of stubborness when it comes to honor. Achilles refuses to fight after Agamemnon robs him of his war-prize, Briseis. Hector refuses not to fight Achilles even though his wife pleads with him not to do so. In Iliad 22, Hector also could have returned to the safety of the city, but his concern about what his fellow Trojans would think compel him to remain on the battlefield and face Achilles.
In sum, the respective characters of Achilles and Hector are shaped by their circumstances. Hector is fighting to defend his city and family, while Achilles is fighting to gain glory and honor.