He said to them, “This kind can only come out through prayer.”
-- Mk 9:14-29
"When the Church asks publicly and authoritatively in the name of Jesus Christ that a person or object be protected against the power of the Evil One and withdrawn from his dominion, it is called exorcism. Jesus performed exorcisms and from him the Church has received the power and office of exorcizing. In a simple form, exorcism is performed at the celebration of Baptism. The solemn exorcism, called "a major exorcism," can be performed only by a priest and with the permission of the bishop. The priest must proceed with prudence, strictly observing the rules established by the Church. Exorcism is directed at the expulsion of demons or to the liberation from demonic possession through the spiritual authority which Jesus entrusted to his Church. Illness, especially psychological illness, is a very different matter; treating this is the concern of medical science. Therefore, before an exorcism is performed, it is important to ascertain that one is dealing with the presence of the Evil One, and not an illness."
-- CCC 1673