The concept of Siddhi Mantra reveals a particular Mantra that can lead to success. It is a sign of great devotion from a devotee. In Ravana's case, granting him this knowledge came from Lord Shiva. Ravana was a fervent devotee of Lord Shiva. Initially, he approaches Lord Shiva with arrogance and pride, seeking lift up the Lord's Abode of Kailash with his 20 hands. Lord Shiva stopped this by simply placing his toe on the ground, thereby crushing Ravana. From that point on, Ravana became an ardent devotee of Lord Shiva, dedicating penance after penance to the Lord. In this, Lord Shiva was pleased with Ravana.
Lord Shiva is able to teach Ravana many elements and bequeath upon him many a boon. The Siddhi Mantra is one particular aspect of this. A mantra dedicated to success, Lord Shiva teaches Ravana the Siddhi Mantra as well as other elements that will guarantee his success as a devotee of Lord Shiva. Lord Shiva makes it a point to instruct Ravana that he must use the mantras for good and never utilize Lord Shiva's teachings for self- indulgence or evil. It is in this where he breaks the code with Lord Shiva, paving the way for Lord Rama to challenge and defeat him. In killing a devotee of Lord Shiva, Lord Rama does penance for his deed at Rameshwaram, one of the sacred Lord Shiva temples in India.