Hereteks are former techpriests who have fallen from the orthodoxy of the Adeptus Mechanicus. They are notable for being free from the heavy restrictions on research that the Mechanicum enforces, which lets them create new technologies and discover new ideas their loyal counterparts may have passed over as heretical. Unfortunately, given the existence of Chaos and Necrons, some avenues of inquiry really should be left alone; a gnashing daemonic death machine arising from what was intended to be a revolutionary new farming vehicle is not unheard of. Although depending on the heretek, that may in fact be the goal. After all, a possessed machine needs no maintenance. And really, who cares about one or two of the billions of slaves being eaten?
They aren't quite synonymous with the Dark Mechanicum, though there's certainly a lot of overlap. Even among the Hereteks who work for Chaos, some are true believers, while others just want to do research in peace and make guns for skullfuckingly evil monsters because, hey, it pays the bills. This isn't, of course, completely universal. During the Moirae Schism the whole Mechanicum sort of broke apart over matters of faith and divinity. What defines "heresy" often amount to what faction's in charge of Mars at the moment. Essentially this means that while everyone in the Dark Mechanicus is a heretek, not every heretek is in the Dark Mechanicus.
Due to their clandestine nature, Hereteks within Imperial territory either exist in the Imperial underworld or as fugitives, probably often looking for Necron tomb worlds to plunder or looking for STCs in places that are best avoided. While not a major part of the 40k 'verse, the Hereteks most often show up in the RPGs, most notably in Black Crusade, where they're a full-fledged archetype. Those Chaos-aligned Hereteks who avoid falling victim to their own creations or the Inquisition often end up with the Dark Mechanicus and forge horrific weapons of war for the servants of the dark gods. There are also rules available for them in regular 40k via Forge World in the Lost and the Damned army list.
Making Legit Hereteks
Some of the robed models in the cultists kit included with Dark Vengeance look remarkably techpriesty. One of them even has an axe that look remarkably like an Omnissian axe. You can buy a whole squad for a couple of bucks from ebay. Pick one of them, glue some bits that you have left around from Skitarii, tech priests, Onagers, or whatever, and viola: you have a nice 2$ enginseer. (With a perfectly disturbing chaotic look.)
An Arch-Heretek dedicated to
coolheretical alien technology.
An idiotic Heretek dedicated to Exterminatus. I SAID EXTERMINATUS!