Heresy, according to the Oxford English Dictionary, is a "theological or religious opinion or doctrine maintained in opposition, or held to be contrary, to the Catholic or Orthodox doctrine of the Christian Church, or, by extension, to that of any church, creed, or religious system, considered as orthodox. By extension, heresy is an opinion or doctrine in philosophy, politics, science, art, etc., at variance with those generally accepted as authoritative." The study of heresy is heresiology.
Etymology
The word "heresy" comes from the Greek αιρεσις, hairesis (from αιρεομαι, haireomai, "choose"), which means either a choice of beliefs or a faction of dissident believers. It was given wide currency by Irenaeus in his tract Contra Haereses (Against Heresies) to describe and discredit his opponents in the early Christian Church. He described his own position as orthodox (from ortho- "straight" + doxa "thinking") and his position eventually evolved into the position of the early Christian Church.
Thus it will be perceived that "heresy" has no purely objective meaning: the category exists only from the point-of-view of a position within a sect that has been previously defined as "orthodox". Thus, too, any nonconformist view within any field may be perceived as "heretical" by others within that field who are convinced that their view is "orthodox"; in the sciences this extension is made tongue-in-cheek.