Because Harry disarmed Draco after Draco had disarmed Dumbledore, the Elder wand became Harry's. In the final duel, a priori incantatem results in Voldemort's death. With no more Horcruxes to bring himself back, Tom Riddle disintegrates into ultimate oblivion.
The Hogwarts crew manage to destroy three more Horcruxes (one results in the death of lackey Crabbe). Harry, by reading Voldemort's thoughts, can feel him growing weaker and learns that the final Horcrux lies within his snake Nagini.
Voldemort can feel that the Elder wand is rejecting him. He explains to Snape that since he killed Dumbledore, the wand will only yield to him. To rectify this, Voldemort orders Nagini to attack Snape. He then disapparates with Nagini.
Harry captures a memory in Snape's tear, which reveals how much Snape loved Harry's mother Lily, how he agreed to watch over Harry during his time at Hogwarts, and when Dumbledore asked Severus to be the one who kills him if Draco cannot do it. Realizing that he must die for Voldemort to be destroyed, Harry confronts Voldemort, who casts the killing curse on a defenseless Harry.
Harry awakes in a dream world representing Kings' Cross in London. Also there are Dumbledore and a dying child resembling Voldemort. When Voldemort attacked Harry's parents, their love for Harry altered his magic, inadvertently making Harry an eighth Horcrux.
Harry awakens, but pretends to still be dead, and is brought to Hogwarts. Neville steps up to Voldemort and pulls the sword of Gryffindor from the Sorting Hat. When Harry reveals that he is alive, the two sides go at it while Voldemort chases Harry down to finish the job.
Among characters killed are Remus Lupin, Nymphadora Tonks, Fred Weasley, Fenrir Greyback, and Bellatrix Lestrange (in a bried duel with Mrs. Weasley).
Harry asks Voldemort if the wand rejected him because it disagrees with him or because it really is not his to begin with. In a final duel, Harry and Voldemort engage in a Priori Incantatem, during which Nagini is killed by Neville. With no more Horcruxes, Voldemort disintegrates into ultimate oblivion.
Harry tells Ron and Hermione that when Draco disarmed Dumbledore, the Elder wand became Draco's. And when Harry disarmed Draco, the Elder wand became his. To ensure that no one may attain immortality, Harry destroys the Elder wand.
Nineteen years later, the children of Ron and Hermione, Harry and Ginny, and others, make their way to their first year at Hogwarts. With his scar not hurting for nearly the last two decades, Harry knows all is well.