Om Namah Shivaya is among the oldest and most widely chanted mantras in Hindu devotion. It is known as the Panchakshara, the five-syllable mantra, counted as na-mah-shi-va-ya; when the preceding Om is included it is sometimes called the Shadakshara, the six-syllable form. The mantra appears in the Shri Rudram, a hymn of the Krishna Yajurveda, which places it among the older layers of Vedic recitation rather than among later devotional compositions.
The words translate simply as "I bow to Shiva". Devotees understand that bowing in more than one sense. Shiva is the destroyer within the trimurti, and what he destroys is understood as ego, attachment and the accumulation of habit — so the bow is an act of setting down rather than of asking for something.
Because the mantra is short and its rhythm is even, it suits repetition. Many devotees chant it as japa, counting on a rudraksha mala, and it is equally at home sung slowly as a bhajan with a congregation answering line for line.
Monday is Shiva's day of the week, and the mantra is heard most on Mondays, through the month of Shravan, and above all on Maha Shivaratri, when temples keep it going through the night.