The object in which a dark witch or wizard hides a detached fragment of their soul is known as a Horcrux. Horcruxes can be made into almost any object, including inanimate objects and living beings, though inanimate objects have been preferred to decrease the chance of their destruction. As long as the chosen object remains intact, so does the embedded soul fragment. That means the maker of it will stay in the world of the living unless that fragment is destroyed, even if their physical body gets dealt an otherwise lethal blow. However, they would retain a non-corporeal shade form, essentially like a ghost but still alive. Only two known wizards had made Horcruxes in all of wizarding history, with the first to do so being Herpo, who lived in Ancient Greece, and Tom Marvolo Riddle, who later came to be known as Lord Voldemort.
Herpo, who had earned the title of "the Foul" by the wizarding world, was well-versed in the Dark Arts and matters of one's soul. He was one of the earliest known dark wizards and was a natural-born Parselmouth, meaning he could communicate with snakes. During his life, he created many curses and left a lasting impression with his work. He was also the first wizard to breed a Basilisk. A Basilisk is considered a dark creature of great power, an XXXXX-classified beast. He discovered that hatching a chicken egg under a toad would create a Basilisk. Herpo used Parseltongue to control the beast and even had one as a pet, being one of the few cases of the domestication of such dangerous creatures. Herpo used his grand understanding of how the soul works to be the first wizard to create a Horcrux and possibly even the process of doing so. It's unknown what item he used as a Horcrux or if it was ever destroyed. His contributions to the wizarding world and, in turn, the Dark Arts, led to Herpo eventually being featured on a Chocolate Frog Card.
Tom Marvolo Riddle, also known as Lord Voldemort, became one of the strongest dark wizards to be known in the wizarding world. As the second and last known creator of Horcruxes, he was skillful in the Dark Arts and was the only case of multiple Horcruxes. Voldemort made six Horcruxes, as he wanted to split his soul into seven pieces, with the seventh main piece remaining within his body since seven is the most powerful magical number. Those six Horcruxes are T.M. Riddle's diary, Marvolo Gaunt's ring, Slytherin's locket, Hufflepuff's cup, Ravenclaw's diadem, and Nagini. However, Voldemort had made a pseudo-Horcrux of Harry Potter, meaning a soul fragment was embedded into Harry without the typical process of creating a Horcrux. This would make it seven Horcruxes instead, with six of them being "true" Horcruxes. Riddle began looking into Horcruxes at an early age, reading books in the Hogwarts library's Restricted Section that contained information about them. At just sixteen, Riddle made his first Horcrux and, shortly after, made his second Horcrux while attending the wizarding school. Before he made his second, he would turn to Professor Slughorn for answers about the possibility of creating multiple during Riddle's sixth year at Hogwarts since he couldn't find anything about the subject even in the library's Restricted Section. Professor Slughorn, who believed the questions were simply for academic purposes, answered all of them to the best of his ability, though he was appalled at the idea of creating multiple Horcruxes. Shortly after Riddle talked to Professor Slughorn, Albus Dumbledore, a Professor at Hogwarts at the time, had the books that mentioned Horcruxes removed from the Hogwarts library.
Horcruxes weren't a popular, published subject of a book, so there were very few that needed to be removed. The first book about Horcruxes found in the Restricted Section was Magick Moste Evile by Godelot. It was written in the early Middle Ages, used as a reference for the Dark Arts, featuring an array of dangerous spells made with the help of his wand, which Godelot claims to have been made from Elder wood, making his wand rumored to be the Elder Wand to those who believe in the Deathly Hallows. The book significantly advanced the Dark Arts at the time it was written. The book only mentions Horcruxes in passing, with very little detail about them, and it doesn't even explain what Horcruxes are. Quoted from the book, "Of the Horcrux, wickedest of magical inventions, we shall not speak nor give direction." Hermione Granger checked out this book from the Restricted Section in 1997 during her sixth year at Hogwarts. She had hoped to learn more about Horcruxes from the book but found it lacking in that regard. Hermione became irritated with its lack of information and slammed it shut, causing that specific copy of the book to let out a "ghostly wail."
The main book that held the most information about Horcruxes was Secrets of the Darkest Art by Owle Bullock. This book was the most likely to have taught Tom Riddle about the making and destruction of Horcruxes since it is the only known source of written instruction on how to do it. It was written sometime before 1890, focusing on advanced Dark Arts, which is why Horcruxes are featured. Before Dumbledore had the book removed from the Hogwarts library, students weren't allowed to read it since the subject was banned by the 1940s, yet it remained long enough for Tom Riddle to read it. The exact date on which Dumbledore had the books removed from the library is unknown, but it's documented to have been before June 1997. After it was removed, it was stored in Dumbledore's office, later retrieved by Hermione Granger at the end of her sixth year to learn how to destroy Lord Voldemort. She had managed to get the book by using the spell "Accio Horcrux books" inside Dumbledore's office. Despite finding the book repulsive, she used the information inside to aid Harry Potter.