Exorcism
In Catholic Christianity, exorcisms are performed in the name of Jesus Christ. A distinction is made between a formal exorcism, which can only be conducted by a priest during a baptism or with the permission of a bishop, and "prayers of deliverance" which can be said by anyone.
The Catholic rite for a formal exorcism, called a "Major Exorcism", is given in Section 11 of the Rituale Romanum. The Ritual lists guidelines for conducting an exorcism, and for determining when a formal exorcism is required. Priests are instructed to carefully determine that the nature of the affliction is not actually a psychological or physical illness before proceeding.
Witchcraft
It is a common belief that jinn can possess a human, thus requiring exorcism ("ruqya") derived from the Prophet's "sunnah" to cast off the jinn or devils from the body of the possessed. The practice of seeking help from the jinn is prohibited and can lead to possession. The "ruqya" contains verses of the Qur'an as well as prayers specifically targeted against demons. The knowledge of which verses of the Qur'an to use in what way is what is considered "magic knowledge."