When the tide of the Trojan war had turned against the Greeks and then the Trojans were threatening their ships, Patroclus convinces Achilles to let him lead the Myrmidons into battle then, Hector killed Patroclus by slitting his throat and after piercing him in the stomach with a sword.
Achilles fought Hector because of the death of a close friend (Patroclus). Achilles reconciled with Agamemnon and joined the other Greeks in fighting against the Trojans in order to pursue Hector. When the Greek Army raided the Trojan Castle, Hector came out to meet Achilles in a 1v1 combat. Then, Achilles killed Hector and took off the armor of Hector.
Achilles then killed Hector in the 1v1 combat battle. After Achilles killed Hector he tied him up to the carriage and started riding around the battle arena. Practically saying "haha! i killed Hector" with his body language and actions.
After Achilles killed and dragged Hectors body around, Hectors father AKA Priam turns to Achilles and pleads him for Hectors body back so that Hector can be buried. Zeus sends Hermes to lead Priam into the Greek camp. He cites the memory of Achilles father Peleus