This is a very big topic. You must have a profound connection with the Buddha dharma to understand this topic. These are some clear points about the protectors in general terms.
It dates back to the tradition of Bön with the wrathful demonic presences and the elemental beings. When Padmasambhava came to Tibet with his wisdom and compassion he was able to incorporate the wrathful presences and the elemental beings into the Tibetan Buddhism as protectors. These protectors became incorporated into tantras, namely Vajrayana. Protectors are everywhere.
The protectors are very misunderstood by the westerners, particularly those who hold a belief of God who punishes them for their actions. The frightening look, perhaps the unusual ways in which they are portrayed, with human flesh hanging off of them as scarfs and khatvangas in their arms and bowls of amrita, may cause a westerner to feel terrified.
The protectors are extremely powerful essential beings. They come from the primordial place, the dharmakaya and are independent and interconnected to the Buddhist Dharma.
The protectors role is not to frighten, although that may be part of their work, they are intricately connected in the affairs of the Buddha Dharma.
They are vital beings who understand the conditions, the environment, the visible the invisible and the negotiable and the non-negotiable. They exist on every level of the mind.
There are many many many inconceivable amounts of protectors and their retinues in Buddhism. Every linage has its main protector. For some it is Ekajati, for others it is Dorje Legpa and for others it is Mahakala.
The Dharmapalas are most commonly presented in three as: Ekajati, Dorje Legpa and Rahula. Each protector is responsible for something. Each protector has an unique to them history and also may have been a living being in the ancient times like Dorje Legpa.
It is very important to receive proper transmissions from qualified teachers before working with the protectors.
The reason why the protectors are so important is that they guard the precious dharma teachings, the teachings within the teachings, the secrets and teachers and students. The protectors have their own language and they know how to communicate on subtle level with other beings. They are not only tantric beings they represent a multitude of inner expressions of the Dharma. Just like the Dakinis who also represent the inner manifestations of the Buddha Dharma. They are active beings.
They point the practitioners in the right direction, help form right relationships, they make sure the Dharma maintains its traditions and that the teachers have the right relationships with the students. It is healthy to have great deal of respect for the protectors. They communicate with great ease with Enlightened Buddhas and they are also enlightened. They have their own superior intelligence. They have made certain commitments to the Dharma and this is why it is so.
Protectors are misunderstood because they are not understood by the lay-people. Similarly to wrathful deities, but differently, protectors may show us the parts of our mind that both needs to be purified and reinforced and thus transformed into wisdom essence.
Their images are reflections.
Rev. Dr. K. Sonam Wangmo