Heresy is a word used by different religious groups, used to describe someone who has ideas that are different from what the religion or law teaches. Such a person is known as heretic.
In the Middle Ages it was not uncommon to accuse someone of heresy. If the accusations could be proven, the culprit would go through a ritual. Since torture could be used, the accusations were often proven. The ritual was done to save the soul of the convicted criminal. It involved being burnt while tied to a post.