The Book of the Dead is a text and term which has garned a strong sense of mystery and mystisim about it, as the Egyptian Culture was such a unique and richly magickal culture.
The term itself The Book of the Dead, was acutally first developed by the German Egpytologist Karl Richard Lepsius, when he published a section of the texts in 1842.
The Egyption title for the Book of the Dead was The Book of Coming [or Going] Forth By Day and it was a collection of funneary texts
The Book of the Dead was used by the ancient Egyptians as a set of instructions for the afterlife. Not all the spells were used for every burial, but a selection depending on wealth and status. Some spells were gifts to the gods, while other were used so the person could walk, a spell for not dying again in the afterlife, and even a spell 'For preventing a man from going upside down and from eating feces.
The book is therefore not, contrary to popular belief, spells to raise the dead, but rather teachings on what the afterlife would contain and how to overcome the obstacles which stood in the way of reaching the field of reeds (or field of peace), the ultimate goal for an Egyptian in the afterlife.
The text can also be seen as initiation literature into the mystery of the afterlife. The afterlife is mostly a mystery to the average Egyptian, but by obtaining a Book of the Dead, he would be able to read it and would be part of the elite group which knew what the afterlife contained.