The written word has always carried a certain power. Early attempts at spell casting include include written prayers and talismans designed to assist the bearer in everything from finding sexual fulfillment to warding off disease--two things that sometimes went hand-in-hand in the days before penicillin.
With spells being somewhat complex, and the various number of gods/angels/demons and their numerous properties more so, many enterprising individuals sought to write down all of the pertinent information for future generations. Some of the earliest known forms of these writings go back to Mesopotamia, where the spells were inscribed in cuneiform on clay tablets. The ancient Egyptians also preserved their magical system, which was later influenced by the Macedonians when Alexander the Great invaded Egypt. Macedonian culture and magical beliefs merged with those of the Egyptians to form new belief systems.
During the third century BC, the Library of Alexandria began to flourish. The librarians--compulsive collectors of words that they are--in all likelihood preserved magical texts alongside what our twenty-first century minds would call more scientific texts.
Of course, it was only a matter of time before enterprising individuals began to compile all of these various incantations and spells into volumes. In order to give authenticity to the secretive nature of the proceedings, these volumes were sometimes encoded. The authors used multiple languages (Latin, Greek, Hebrew, and cipher) to keep the grimoires out of the hands of the uninitiated. This added to the mystique of the forbidden texts.
Grimoires were usually a combination of astrology, common herb lore, and sympathetic magic, mashed together with with angelic and demonic hierarchies compiled from Jewish and Christian apocalyptic literature and testaments such as The Book of Enoch, The Testament of Solomon, etc. Nor were all grimoires Judeo-Christian. The Ghāyat al-Ḥakīm was an Arabic book of astrology and magic, which was written in Al-Andalus and eventually became known as The Picatrix.
Grimoires regulated and outlined the proper spirit, day, and hour by which certain rites should be performed. Sigils and names were highly important to each ritual, which was to be given the same deliberation as any High Mass. Care was needed, because should the magician call forth a spirit that he or she could not control, then their soul was forfeit.
This esoteric knowledge was once considered sacred or profane, depending on your viewpoint and/or ties to the Church. Texts, such as the manuscript found and examined by Richard Kieckhefer in his book, Forbidden rites: a necromancer's manual of the fifteenth century, are still being discovered in libraries. Finding an intact manuscript can be rare, because during the early fourteenth century, the very possession of magical writings was illegal and might bring the owner under suspicion of witchcraft. Most of these texts, when found, were burned ... sometimes along with the owner if it could be proved that the individual used the texts to work magic. At the very least, mere possession of the manuscript could bring a prison sentence.
As I said earlier, there is power in the written word.
I must warn you, though, to be careful out there. Some things, once summoned, cannot be banished. However, just in case you're looking to explore more about grimoires and magical texts in general, you can check out some of these books:
Davies, Owen. Grimoires: a history of magic books. Oxford University Press, 2010.
Kieckhefer, Richard. Forbidden rites: a necromancer's manual of the fifteenth century. University Park, PA: Pennsylvania State University Press, 1997.
Mollenauer, Lynn Wood. Strange revelations: magic, poison, and sacrilege in Louis XIV's France. University Park, PA: Pennsylvania State University Press, 2006.