The core problem is defeating Voldemort. Harry's solution:
Horcruxes anchor his immortality; destroying them weakens him.
Using Dumbledore's lessons, Slughorn's memory, and deduction, Harry locates six:
Harry's willingness to sacrifice himself—dying by Voldemort's hand but resurrecting via the Elder Wand's allegiance—destroys the final Horcrux (Voldemort's own soul fragment), leading to Voldemort's defeat.
Key factors: determination, intelligence, and self-sacrifice.