Q:

How did this main Harry Potter character die? 

I might be missing something obvious but when I read the seventh Harry Potter, it wasn't clear to me how Voldemort died.  How did Voldemort die? 

A:

He (Voldemort) was dueling with the elder wand, which was loyal (at this point) to Harry, due to a circuitous chain that has been discussed in other threads.   When they both cast at the same time, his spell rebounded upon him.   Why this should be the case is open to speculation (and there has been a lot), but it's pretty clearly laid out in the text of the book:

Tom Riddle hit the floor with a mundane finality, his body feeble and shrunken, the white hands empty, the snakelike face vacant and unknowing.  Voldemort was dead, killed by his own rebounding curse, and Harry stood with two wands in his hand, staring down at his enemy’s shell. 

[Emphasis added]

