When religions, especially in the case of historical Christianity, have established doctrines or dogmas that they insist must be accepted as true, people who don't accept them are declared heretical or heretics. They are guilty of heresy, or disagreeing with the accepted norm.
In the past, the Roman Catholic Church, for instance, established a whole department to "inquire" into questions of heresy. The Inquisition employed extreme measures to root out possible heretics (see Galilei, Galileo). The Puritans of New England used the same methods during the Salem witch trials.
The word has since come to be used outside of religion. Even Republicans and Democrats have been known to accuse those within their ranks as heretics.