The Inquisition was a judicial system within the Catholic Church made up of priests who were charged with ensuring doctrinal integrity and discipline within the Church. The Inquisition was charged with investigating and exposing serious ecclesiastical crimes to ensure moral uprightness amongst the clergy and to root out any false doctrines that were being taught. These inquisitions were usually established locally and overseen by the Holy Office in Rome.
Historically, ecclesiastics found guilty of serious sins such as sodomy or heresy by an inquisition after a thorough investigation and trial would have been sacked and handed over to the secular authorities for punishment.
Thank you