The demons [Rākṣasas], the servants of Hiraṇyakaśipu, thus began striking the tender parts of Prahlāda Mahārāja’s body with their tridents. The demons all had fearful faces, sharp teeth and reddish, coppery beards and hair, and they appeared extremely threatening. Making a tumultuous sound, shouting, “Chop him up! Pierce him!” they began striking Prahlāda Mahārāja, who sat silently, meditating upon the Supreme Personality of Godhead.
Even though a person who has no assets in pious activities performs some good deed, it will have no result. Thus the weapons of the demons had no tangible effects upon Prahlāda Mahārāja because he was a devotee undisturbed by material conditions and fully engaged in meditating upon and serving the Supreme Personality of Godhead, who is unchangeable, who cannot be realized by the material senses, and who is the soul of the entire universe.
My dear King Yudhiṣṭhira, when all the attempts of the demons to kill Prahlāda Mahārāja were futile, the King of the demons, Hiraṇyakaśipu, being most fearful, began contriving other means to kill him.
Hiraṇyakaśipu could not kill his son by throwing him beneath the feet of big elephants, throwing him among huge, fearful snakes, employing destructive spells, hurling him from the top of a hill, conjuring up illusory tricks, administering poison, starving him, exposing him to severe cold, winds, fire and water, or throwing heavy stones to crush him. When Hiraṇyakaśipu found that he could not in any way harm Prahlāda, who was completely sinless, he was in great anxiety about what to do next.
Śrīmad-Bhāgavatam explains that Prahlāda was concentrated on the Supreme Pesonality of Godhead and therefore demons couldn't harm him, as he was protected by the Supreme Personality of Godhead.
I have also foud an alternative explanation in one Buddhist sutta, where it is stated that one who is situated in loving kindess cannot be harmed by fire, poison or any kind of weapon.
"One sleeps easily, wakes easily, dreams no evil dreams. One is dear to human beings, dear to non-human beings. The devas protect one. Neither fire, poison, nor weapons can touch one. One's mind gains concentration quickly. One's complexion is bright. One dies unconfused and — if penetrating no higher — is headed for the Brahma worlds." -- Metta (Mettanisamsa) Sutta
Prahlada, as pure devotee of God, was also situated in loving kindess for all living entities.