JK Rowling created seven horcruxes in the Harry potter series. A horcrux stores part of a person’s soul. If the person who creates the horcrux is destroyed, the user still can survive. Voldemort created horcruxes to attain immortality. Living or non-living objects could be made into Horcruxes.
Tom Riddle uses his diary to create his first Horcrux. The diary is destroyed by Harry Potter.
The second Horcrux is created by Tom Riddle using a ring. The ring is also a deathly hallow, the Resurrection Stone.
The third Horcrux is a cup owned by Hogwarts founder Helga Hufflepuff. The cup is destroyed by Hermione Granger.
Tom Riddle creates his fourth Horcrux using a locket once. Ron destroys the locket using the sword of Godric Gryffindor in the Forest of Dean.Voldemort creates his fifth horcrux using Rowena Ravenclaw’s diadem. The diadem gets destroyed unintentionally by a fiendfyre spell cast by Vincent Crabbe as he, along with two others, attacks Harry.
As a baby, Harry Potter was in the room when Voldemort’s Killing Curse backfired. A part of his soul clings to the only living organism in the room — Harry Potter. And makes the boy wizard a Horcrux too!
Nagini, the snake, is the last horcrux that needs to be destroyed to win over Voldemort. Neville kills it with the Sword of Griffindor. After killing Nagini, Voldemort became fully mortal and could be killed.