This question, which I discovered on Quora last night, seems very straightforward. However, Achilles is a figure of myth, rather than history. Like many mythological figures, the stories about him evolved over time and contain discrepancies.
Homer, who delivers the most famous account of Achilles in his epic poem The Iliad, does not specify exactly how Achilles dies. The most enduring story of Achilles' death seems to be the one in which Paris shoots him with an arrow in his single spot of vulnerability (his heel) in the Temple of Apollo. But this story, which didn't appear in any records before Roman times, may represent a relatively late tradition of Achilles mythology.
A fragment of the Aegimius, an almost entirely lost poem often attributed to Hesiod, indicates that earlier myths about Achilles were slightly different than the one we're most familiar with. In one of its scenes, Achilles' mother Thetis is found dipping her newborn children in a boiling cauldron to test their mortality. But before she can do the same with Achilles, his father Peleus intervenes and saves his mortal son's life.
You may be wondering what this has to do with how Achilles dies. According to Jonathan Burgess, author of "Achilles' Heel: The Death of Achilles in Ancient Myth", what one believes about Achilles' death has everything to do with what one believes about his birth.
In this earlier mythological tradition, the one referenced in the Aegimius, Thetis was not focused on making her children invulnerable (impervious to injury). She was focused on making them immortal. Even though Thetis was a lesser god (or demigod), she was immortal. The thought that her child would be anything less was unacceptable to her. In other words, she was more worried about their mortal or immortal nature than she was about protecting them.
If Burgess is right and Achilles was not invulnerable (or nearly invulnerable) in this lesser-known tradition, then the story about Paris shooting him in the heel doesn't apply here. This version of Achilles would have simply been an exceptional warrior known for his unparalleled speed.
Then why do some of the earliest artistic depictions of Achilles' death show him being shot in the lower leg?
From Burgess' point of view, these depictions are meant to emphasize the importance of Achilles' greatest asset - his lightning-quick legs. We don't have a full account of this earlier tradition, but it's possible that this version of Achilles was killed only after being immobilized by an arrow on the battlefield. Images of him being hit with an arrow in the leg don't necessarily mean he was mostly, or even partly, invulnerable to enemy weaponry.
If Burgess is correct, then this older tradition, which has it roots in the Archaic Age (800-480 BCE) or earlier, evolved over the eons into the Hellenistic version many of us are familiar with today: Thetis dips the baby Achilles into the River Styx to make him invincible, but the heel she holds him by is left unprotected. Later, after avenging the death of Patroclus in the Trojan War, Achilles is shot from behind by Paris in that one exposed spot.
It is clear that there were multiple versions of the life of Achilles. In one, Achilles probably dies in a somewhat conventional method - after being shot in the leg and left defenseless in battle. In another, Achilles dies while visiting the Temple of Apollo, where Paris shoots him in his single point of invulnerability. The god Apollo, a rival of Achilles, may have helped guide Paris' arrow in both versions.
I know this is a complex answer to a simple question. But the development of mythology is not always straightforward. There is no single "correct" answer to the question of how Achilles died. He is a fictional character (as far as we know). One can choose whichever story, or interpretation, he prefers.