The demon Adi was the son of Andhak, who had been killed by JSiva. To gain revenge, Adi did austerities (tapas) with the sole purpose of receiving a boon (vara) from Brahma, the creator. In due course Brahma granted him the vara, so Adi asked for invincibility in battle. But boons, especially to demons, are proviĀsional, and may be invalidated by a flaw in the wording of the request. The literal wording of Adi’s request won for him invincibility only while in his asura form.
Not knowing this limitation and quite certain of his invincibility, Adi went to Kailasa, (Siva‘s heavenly abode, to avenge this death of his father. Adi first changed into the form of a serpent. Since snakes are natural friends of (Siva, who is lord of all creatures, Adi was allowed into (Siva’s presence. But once inside (Siva’s palace, Adi again changed his form to appear like Siva’s wife, Parvati. Siva recognized the deceit and killed Adi, who had lost the boon of immortality by being in another form than his own.