The Spanish Inquisition, a tribunal of the Papal Inquisition was founded by Isabella I of Castille and Ferdinand II if Aragon in 1478. It was aimed at rooting out heretics in order for the Catholic Church to remain in power in the region.
Heretics were loosely defined as any persons who had incorrect beliefs or did not conform to the teachings of the bible, would not renounce their ways and taught their beliefs to others. The methods used to extract confessions and to force alleged heretics to renounce their beliefs were controversial to say the least.
The accused had to face a tribunal where they were asked to testify as to their beliefs and where judgement was made upon them. However, they received no legal representation, they could be accused by any person and was not made aware of what the charges were. If the accused refused to testify, he was automatically assumed to be guilty.
Torture was also used in many cases to extract confessions but not as punishment for those who were found guilty. Water torture, starvation and other long term tactics were largely used to force an accused to renounce their beliefs as well as other forms of torture.
Jews, Muslims and Protestants bore the brunt of these trials, however, every person who was considered to be a non-believer could be accused and brought before the tribunal. Many innocent people died as a result as execution was the primary punishment for those who were found guilty.
The goal of the Spanish Inquisition was primarily to discourage other religious beliefs as well as keep the church in power. It was therefore politically motivated rather than religiously like so many people believed at the time.
The Spanish Inquisition only ended in 1834 when it was officially abolished by Isabel II.