The Greek word hairesis that is translated heresy or its plural (Strong's Concordance #G139) is in Acts 24:14, 1Corinthians 11:19, Galatians 5:20 and 2Peter 2:1. It means "disunion, someone who causes division." The New Testament warns Christians to be watchful against those who teach lies for the express purpose of pulling believers apart.
But there were also false prophets among the people, as indeed there will be false teachers among you, who will stealthily introduce destructive heresies (2Peter 2:1)
I am astonished that you are so quickly being turned away from Him Who called you into the grace of Christ, to a different gospel, Which in reality is not another gospel; but there are some who are troubling you and are desiring to pervert the gospel of Christ (with heresy or false teachings, Galatians 1:6 - 7).
Surprisingly, the Apostle Paul was accused, by those who wanted him dead, of causing division among the Jews for preaching the truth!
But I confess to you that according to the way which they call heresy, so I serve the God of my fathers, believing all things that are written in the Law and the Prophets (Acts 24:14).
Note that the New Testament does not unilaterally condemn a person who believes, even on a variety of subjects, something different (what could be labeled heresy) than what is stated in a fellowship's statement of beliefs. It also does not use the label 'heretic' on those people who maintain differing opinions.
What the Bible does consider true heresy, however, is a set of beliefs used for the purpose of dividing a local fellowship or church. Paul, in his letter to the Romans, states that people who gather to worship God can have different understandings regarding a range of topics.
Receive the one who is weak in the faith, but not for divisive arguments . . . Therefore, we should no longer judge one another, but judge this instead: Do not put an occasion of stumbling or a cause of offense before your brother (Romans 14:1, 13).
Today, when church leaders define someone as a heretic, they usually mean the person in question has rejected one or more tenets deemed foundational to the group. The person is considered to believe heresy and will be (usually) asked to keep such beliefs to themselves and / or told not to attend the group any longer. Such rejection may even take the form of being forcibly thrown out and officially disfellowshipped from the church they attended.