This hymn is called rma raksh stotra and is from the scripture nanda rmyana. It is stated in the fifth sarga of janma khanda of nanda rmyana. It is a conversation between vishnudsa and his guru rmadsa.
This hymn was revealed to goddess gauri by lord Shiva in the presence of skanda. He initiated the hymn to goddess gauri and instructed her to do the protection rituals for skanda so that he can defeat and destroy traka.
After bowing to lord rma, he started teaching the hymn. Goddess gauri chanted the mantra and did the protection ritual for skanda. By the power of the mantra, skanda defeated traksura.
Chanting of the hymn can rectify all our fears, protects us from illness, cruel animals and insects, enemies, negative forces, negativity, and blesses us with peace, happiness, good health, true devotion on the holy feet of rama, wisdom and finally liberation