A Horcrux is an object in which one can conceal a fragment of their soul. It grants the creator a kind of immortality in the sense that even if they die, a part of their soul will live on within the object. The only way a person who has created horcruxes can die is if all horcruxes are destroyed, although doing such a deed is by no means an easy feat. To create a horcrux is considered one of the worst pieces of dark magic, to create one requires the shedding of the soul of another human being, in other words, murder. Creating horcruxes has its consequences as it is considered an attempt to tamper with the laws of morality, their creation can result in a loss of humanity and can even cause the creator to change appearance something which is said to have happened to Voldemort as he continued to create his horcruxes.
One is able to put their soul back together although this is extremely dangerous and is often frought with more danger than the creation of the horcruxes in the first place. In order to reconstruct the soul, the creator must show real remorse for what he has done, doing so however can result in death.
The first known creation of a horcrux was believed to be by Herpo the Foul. The only other creator is Voldemort himself, it is possible that other witches/wizards created them but they were not written into the history books as the subject of horcruxes is regarded as taboo. Horcruxes are only mentioned in the darkest of literary materials for example in the restricted section in Hogwarts, although these were later removed by Dumbledore.
Voldemort in his quest for immortality created six different horcruxes as well as one which was unintentional. Doing such an act was said to be very dangerous as he was pushing his body well and truly to the limit, his soul was rendered unstable consequentially.
The first horcrux created by Voldemort was his diary followed swiftly by the prized artefacts belonging to the Hogwarts co-founders, Salazar Slytherin's Locket, Helga Hufflepuff's Cup and Rowena Ravenclaw's Diadem. It is speculated that Voldemort wished to create a horcrux from an object related to Gryffindor but was not able to locate one. After returning to his family's shack in Little Hangleton, he was able to steal the Gaunt Ring, a priceless heirloom, topped with the resurrection stone, unbeknowst to him. This also became a horcrux. Harry Potter was accidentally turned into a horcrux after a piece of Voldemort's soul attached itself to Harry after his Avada Kedavra curse backfired. His final horcrux, the snake Nagini, was created in the woods of Albania, the Eastern European country Voldemort was forced to retreat to after his first downfall.