According to Hindu mythology, there are three gods who together represent the Supreme Divinity: Brahma (the creator), Vishnu (the preserver) and Shiva (the destroyer). Though Shiva is considered a destroyer, he also symbolizes the inner self that remains intact even after everything ends. In this mantra, the chanter bows to Shiva, or the true Self.
Traditionally, this mantra is believed to be a powerful healing mantra, beneficial for all physical and mental ailments. The mantra should ideally be chanted twice a day, morning and evening, 108 times each. It is believed that those who chant these five holy syllables while meditating on Shiva will be blessed by visions of the lord of the yogis.
Om namah Shivaya is the most important mantra in Shaivism, which is one of the four most widely followed sects of Hinduism that accepts Shiva as the supreme being.