Heruka Khorlo Demchok
Heruka Khorlo Demchok (chakrasamvara) first appears in the Samayoga tantra in his now recognizable form, that of a fierce charnel ground deity, the manifestation assumed by the Buddha Vajradhara in his effort to subdue evil doers. This is taken from a text that presents a myth of the origin of shri Heruka’s appearance after a period of chaos and evil in the world.
at that time all beings were extremely violent and perverse due to extremely vicious violence, beings fell down wailing. Dying, those beings were reborn as extremely perverse ones due to their habitual tendencies. Their minds blessed by Mara, they were extremely perverse ones, such as spirits who cause fever, poison, and disease and Dakinis, Yaksas, astral spirits (graha) and obstacle demons.
They devastated the triple world, devouring even spiritual practitioners. Even gods, and so forth were killed. The teachings were also destroyed. Then the gods, together with Indra, came before Brahma. And Brahma and the gods with Indra proceeded to take refuge in Visnu. And Brahma, Visnu and the gods came before Mahadeva. Then Brahma, Visnu and Mahadeva took refuge in Vagrin............
It then goes on to present the Heruka's arising, given birth through process of generation of yogic heat, which I wont detail here. Then:
That very blessed lord emerges as a yogin an adamantine fierce one. Greatly glorious Vajraheruka is very terrifying, blazing with ash, his visage blazes blue for beings and his mandala of light blazes red. He is as fierce as the end time of great destruction.
So we have a the ancient "blood drinkers" Heruka of the burial grounds, similar to a demon, and a later manifestation of Heruka that we recognize as kalachakra, Chakrasamvara, Hevajra etc. We also have Herukas of the Buddha families, Ratna, Vajra, Padma etc.
These can be seen in Bardo Thodol images (Tibetan Book Of The Dead) which is taken from the earlier mahayoga ( inner) class, Guhyagarbha tantra ( Secret Essence of Magical Net ) transmitted by Vajrasattava Sattvavajra.
Herukas appear as wrathful manifestations, often in yab yum as the union of wisdom and method and perfection of the four great activities. They look wrathful, but they also represent joy and peace as well.
we have ancient Samantabhadra, and also "newer" Vajradhara. Shakyamuni Buddha is a nirmanakaya (relative) manifestation, his real condition is the dharmakaya, his tantric form is the sambhogakaya (kalachakra, Chakrasamvara, etc) his material form is nirmanakya.
Eight Herukas of the Nyingma Mahayoga
The eight Herukas (Wylie: sgrub pa bka’ brgyad) of the Nyingma mahayoga tradition (and their corresponding sadhanas) are said to have been received by Padmakara from the Eight Vidyadharas (Tib. Rigdzin), or Eight Great Acharyas: Manjushrimitra, Nagarjuna, Vajrahumkara, Vimalamitra, Prabhahasti, Dhanasamskrita, Shintamgarbha and Guhyachandra. They were proficient in the practices of, respectively"