The following is a description by Srila Prabhupada of how the energy of Krishna acts in both bewildering and liberating the living entities.
Parasya saktir vividhaiva sruyate (Svetasvatara Upanisad 6.8 [Cc. Madhya 13.65, purport]). In the Vedas it is said that the potencies of the Supreme Personality of Godhead are called by different names, such as yogamaya and mahamaya. Ultimately, however, the Lord's potency is one, exactly as electric potency is one although it can act both to cool and to heat. The Lord's potency acts in both the spiritual and material worlds. In the spiritual world the Lord's potency works as yogamaya, and in the material world the same potency works as mahamaya, exactly as electricity works in both a heater and a cooler. In the material world, this potency, working as mahamaya, acts upon the conditioned souls to deprive them more and more of devotional service. It is said, yaya sammohito jiva atmanam tri-gunatmakam [SB 1.7.5]. In the material world the conditioned soul thinks of himself as a product of tri-guna, the three modes of material nature. This is the bodily conception of life. Because of associating with the three gunas of the material potency, everyone identifies himself with his body. Someone is thinking he is a brahmana, someone a ksatriya, and someone a vaisya or sudra. Actually, however, one is neither a brahmana, a ksatriya, a vaisya nor a sudra; one is part and parcel of the Supreme Lord (mamaivamsah), but because of being covered by the material energy, mahamaya, one identifies himself in these different ways. When the conditioned soul becomes liberated, however, he thinks himself an eternal servant of Krsna. Jivera 'svarupa' haya-krsnera 'nitya-dasa.' [Cc. Madhya 20.108]. When he comes to that position, the same potency, acting as yogamaya, increasingly helps him become purified and devote his energy to the service of the Lord.
In either case, whether the soul is conditioned or liberated, the Lord is supreme. As stated in Bhagavad-gita (9.10), mayadhyaksena prakrtih suyate sa-caracaram: it is by the order of the Supreme Personality of Godhead that the material energy, mahamaya, works upon the conditioned soul.
gunaih karmani sarvasah
kartaham iti manyate
"The bewildered spirit soul, under the influence of the three modes of material nature, thinks himself to be the doer of activities which are in actuality carried out by nature." (Bg. 3.27) Within conditioned life, no one has freedom, but because one is bewildered, being subject to the rule of mahamaya, one foolishly thinks himself independent (ahankara-vimudhatma kartaham iti manyate [Bg. 3.27]). But when the conditioned soul becomes liberated by executing devotional service, he is given a greater and greater chance to relish a relationship with the Supreme Personality of Godhead in different transcendental statuses, such as dasya-rasa, sakhya-rasa, vatsalya-rasa and madhurya-rasa.
Thus the Lord's potency, visnu-maya, has two features -- avaranika and unmukha. When the Lord appeared, His potency came with Him and acted in different ways. She acted as yogamaya with Yasoda, Devaki and other intimate relations of the Lord, and she acted in a different way with Kamsa, Salva and other asuras. By the order of Lord Krsna, His potency yogamaya came with Him and exhibited different activities according to the time and circumstances. Karyarthe sambhavisyati. Yogamaya acted differently to execute different purposes desired by the Lord. As confirmed in Bhagavad-gita (9.13), mahatmanas tu mam partha daivim prakrtim asritah. The mahatmas, who fully surrender to the lotus feet of the Lord, are directed by yogamaya, whereas the duratmas, those who are devoid of devotional service, are directed by mahamaya.
SB 10.1.25 purport