Demonology is the systematic study of demons. To the extent that it refers to theology elaborating the meaning of sacred texts, demonology is an orthodox branch of theology. The most extensive statement of western Christian demonology is the Malleus Maleficarum of Jacob Sprenger and Heinrich Kramer, which attempted to prove that the existence and power of witchcraft were an integral part of the Roman Catholic faith. In another sense, demonology refers to catalogues that attempt to name and set a hierarchy to evil spirits. In this sense, demonology is the mirror image of angelology, which attempts to compile the same information for good spirits.
In Christian tradition, demons are fallen angels, so demonology could be considered a branch of angelology. However, many databases of demonology seem to be compiled for the assistance of those who would invoke evil spirits, containing instructions on how to summon them and (hopefully) bend them to the conjuror's will. The grimoires of occult magic are the tomes that contain the lore of this version of demonology.
The existence of a malevolent supernatural personality who works to thwart the will of a good God is a central tenet of both Christianity and Islam. These faiths, in turn, derive the Satan or Shaitan figure from Judaism. It is generally accepted among scholars that Judaism received the concept from Zoroastrianism, wherein a good god known as Ahura Mazda is engaged in a cosmic battle with an evil god known as Angra Mainyu. The New Testament explicitly affirms the existence of lesser adversary spirits, as does the Qur'an. However, the Old Testament presents Satan as a member of God's heavenly court who acts as a prosecuting attorney, seeking God's permission to test the virtue of Job.
Some branches of Buddhism affirm the existence of Hells peopled by demons who torment sinners and tempt mortals to sin, or who seek to thwart their enlightenment. Hinduism contains traditions of combats between its gods and various adversaries, such as the combat of Indra and Vritra.