The Horcrux is a dark curse discovered and created by Tom Marvolo Riddle. The power lived inside 7 objects in order: Tom Riddle's Diary, Marvolo Gaunt's Ring, Salazar Slytherin's Locket, Helga Hufflepuff's Cup, Rowena Ravenclaw's diadem, Harry Potter (unintentionally, due to Voldemort's failed attempt to kill him with the killing curse) and Nagini.
Destruction of the Horcruxes
The first Horcrux was destroyed by Harry Potter (unknown to him) when he stabs Tom Riddle's diary with the basilisk fang.
A few years later, Dumbledore destroyed Marvolo Gaunt's Ring with Godric Gryffindor's Sword, that has been embedded with the basilisk venom after Harry stabbed the creature with the sword. Harry and Dumbledore venture to the cave and find the locket of Salazar Slytherin, but it turns out to be a fake, with the message left by R.A.B.
After Dumbledore's death, Harry, Ron and Hermione set out to find the hidden Horcruxes and the real locket. Figuring out that R.A.B. means Regulus Black, and learning from Kreacher that the real locket was in the hands of Mundungus Fletcher who reveals to the trio that Dolores Umbridge had taken the locket from him. Under the use of Polyjuice Potion, the trio stun Umbridge and take back the locket.
After unable to destroy the locket, they had to take turns of wearing it, thus causing negative emotions for them, which lead to Ron aggressively leaving the group. Weeks and a highly dangerous visit to Godric's Hollow later, Harry and Hermione were encamped in the Forest of Dean. That night, Harry followed a bright white light into the forest, and with this guidance from Severus Snape's Patronus, Harry was able to find Godric Gryffindor's Sword at the bottom of a frozen pond. Stripping down, Harry waded into the freezing pool to retrieve the sword. Unfortunately, the locket around his neck tried to kill him both by strangling him and keeping him under the water, nearly drowning him. At that time, Ron returned, and rescued Harry from drowning.
After reconciling, Ron smashed the locket with the sword, shattering both glass windows inside the locket and destroying the Horcrux.