A Horcrux is an object used to store part of a person's soul, protecting him or her from death (a function similar to a Lich's phylactery from other fantasy works). If the body of a Horcrux owner is killed, that portion of the soul that had remained in the body does not pass on to the next world, but will rather exist in a non-corporeal form capable of being resurrected by another wizard, as stated in Half-Blood Prince. If all of someone's Horcruxes are destroyed, then the soul's only anchor in the material world would be the body, the destruction of which would then cause final death. The creation of Horcruxes is considered the darkest of all magic.

This method was chosen by Voldemort to attain immortality.

Horcruxes made from inanimate objects are extremely difficult to destroy. They cannot be destroyed by conventional means such as smashing, breaking, or burning. To be destroyed, a Horcrux must suffer damage so severe that repair through magical means would be impossible.

The Horcruxes created by Lord Voldemort are Tom Riddle's Diary, Marvolo Gaunt's Ring, Helga Hufflepuff's Cup, Salazar Slytherin's Locket, Rowena Ravenclaw's Diadem, Nagini, and Harry Potter.

The Sword of Gryffindor was not a Horcrux but could, in fact, destroy them.

More Info: en.m.wikipedia.org