Ecclesiarchy
The Adeptus Ministorum, or Ecclesiarchy, is the state church of the Imperium of Man, making it the group which defines heresy.
When the Emperor of Mankind began setting up the Imperium, he began instituting the Imperial Truth, which basically said "there are no gods and we're doing science and reason now". Yet even during the Great Crusade people began worshiping the Emperor as a "God-Emperor", including his own son Lorgar, who wrote the Lectitio Divinatus. Suitably embarrassed, the Emperor politely informed Lorgar to stop worshiping him the bullshit. By having the Ultramarines destroy a city the Word Bearers set up and then forcing Lorgar to bow down to Himself, Malcador the Sigillite, and Roboute Guilliman in front of his legion. Somewhat unsurprisingly In an unfathomable and completely impossible to predict act of Heresy, this would lead to Lorgar worshiping the Chaos Gods and starting the Horus Heresy. The Emperor, was not a good judge of character The Emprah, beloved by All, was saddened.
Age of Apostasy
After the Emprah was hooked up to the Golden Throne, a "Cult of the Savior Emperor" (more often referred to as the "Imperial Cult", since every Imperial's a member) was set up and eventually became the state religion as the Adeptus Ministorum. The Ecclesiarch, the head of the Ministorum, eventually got on the High Lords of Terra, eventually supplanting the Master of the Administratum as head of the Council, starting the Age of Apostasy. After that, the Ecclesiarchy started becoming what every powerful group in the Imperium does: more interested in its own power than the people they're supposed to be ministering to. Things took a major turn for the worse when Goge Vandire, the Master of the Administratum, became Ecclesiarch, starting the Reign of Blood. Even by 40k standards this guy was nutters. After convincing a sect called the Daughters of the Emperor to become his bodyguards, a "rogue" preacher named Sebastian Thor and his sect (the Confederation of Light), supported by a couple Space Marine Chapters and the Adeptus Mechanicus, went "fuck this" and invaded Terra to remove Vandire from the throne (so to speak). To the surprise of all present (except the Daughters), the Daughters not only held off the invaders, but actually managed to give them a real beating. Before things got out of hand, the Adeptus Custodes took the leader of the Daughters to the Golden Throne. She got insanely pissed off by something that happened there and cut off Vandire's head.
Thorian Reformation
Afterwards, Thor started the Thorian Reformation, in which the Temple of the Saviour Emperor was supplanted by Thor's Confederation of Light. The Ecclesiarchy was stripped of all military power, but, fortunately for them, they were specifically banned from keeping "men under arms", and so they reformed the Daughters into the Battle Sisters of the Adepta Sororitas. The Inquisition also set up the Ordo Hereticus to make sure no one deviated from these new rules. The reformed Ecclesiarchy is still as corrupt and divorced from reality as it was before, but now they feel guilty and beat themselves up about it!
Temple Tendency
Sadly, some people are still particularly abusive, and these people are accused of having a "temple tendency." Additionally, there's an actual heretic group called the Temple Tendency. They believe the Confederation of Light are the real traitors and (secretly) preach their creed. They employ preachers known as Vandiran Apostates, or Shade Priests, which is a much cooler name than "Confessor."