In the early late second and early third century AD, the Christian leader Irenaeus wrote a book called Adversus Haereses, or “Against Heretics,” which has become an enduring work even if it is recognized now that the accounts of supposed heretics are a bit overheated. For example, Valentinius the supposed gnostic proves not to be so different from Irenaeus himself, except in terms of politics. Of course, some  would consider Iranaeus to have been a proto-gnostic himself. It is a notoriously difficult matter to define what a heretic is, especially because there are many ways one can go wrong. Let us at least examine a few of those ways.
At its heart, keeping on the right path is a question of balance. There are a lot of tensions that must be dealt with, a lot of wrestling with different ideals that are all too easy to take to extremes. And it is that extreme, whatever that extreme may be, that is heretical, whatever the issue may be. For example, the two great commandments are to love God with all your heart, all your mind, and all your spirit, and the second one is like it, to love one’s neighbor as oneself. We can very easily decide that loving one’s neighbor may mean being merciless in critique for their own good, or that it may mean turning a blind eye to serious errors out of a desire to avoid conflict. Those qualities which are good (honesty or kindness) can be taken to extremes that are wrong. Likewise, we can emphasize some aspects of God’s ways (social justice, personal morality) while disregarding or minimizing others, and end up being heretical in our approach because we have neglected to believe and act according to some aspect of God’s ways.
Likewise, extremes with regards to authority have a great impact on heresies. One can either be heretical by having too high a regard for human authorities (whether institutions, polities, or philosophical influences) or by having too little a regard for authorities (like scripture). When we set ourselves up as authorities, or when we slavishly follow the wrong authorities, then we can easily be led into heresy. Whether we fall into too much respect and honor or too little, we can be led astray. If we trust our own abilities to understand scripture too much, we can be led into a complacency that we have done enough or know enough to be alright with who we are. If we trust our abilities or understand too little, we can be overwhelmed by the difficulty of the task and trust authorities who do not know much more than ourselves, or even less.
In the end, avoiding heresy is about wrestling. Heresy, however it comes, tends to result from trying to resolve the tensions of life and faith in one direction or another. It is in wrestling with tensions and difficulties, and recognizing different perspectives and the truth that is revealed in different levels that adds to rather than takes away from other meanings that we become better and wiser people able to recognize the complexity in God, in others, and in ourselves. Rather than thinking ourselves to have a divine spark that others lack, and rather than thinking that only a privileged elite has access to the truth that we must learn, our nature becomes improved and our character made more noble by our wrestling with the truths of our existence, until we resemble our heavenly father above, even if some matters are to profound for us to fully understand.