Om Namah Shivaya (Devanagari: ॐ नमः शिवाय ; IAST: Om Namaḥ Śivāya). It is one of the most popular Hindu Mantra and the most important mantra in Shaivism. It is called Siva Panchakshara, or Shiva Panchakshara or simply Panchakshara meaning the "five-syllable" mantra (viz., excluding the Om) dedicated to Lord Shiva. It is the most holy salutation to Lord Shiva. This Mantra appears as 'Na' 'Ma' 'Śi' 'Vā' and 'Ya' in the Shri Rudram hymn which is part of the Krishna Yajurveda and also in the Rudrashtadhyayi which is a part of the Shukla Yajurveda.
This mantra is present in the Shri Rudram hymn which is part of the Krishna Yajurveda. Shri Rudram hymn is taken from two chapters in fourth book of Taittiriya Samhita (TS 4.5, 4.7) of Krishna Yajurveda. Each chapter consist of eleven anuvaka or hymns. Name of both chapters are Namakam (chapter five) and Chamakam (chapter seven) respectively. Om Namah Shivaya mantra appears without OM in eighth hymn of Namakam(TS 4.5.8.1) as Namah shivaya ca shivataraya (Sanskrit: नमः शिवाय च शिवतराय च; IAST: Namaḥ śivāya ca śivatarāya ca). It means "Salutations unto Śiva the auspicious one, unto Śivatara the one than whom none more auspicious can exist".
This mantra is also appears in the Rudrashtadhyayi which is a part of the Shukla Yajurveda. In the Rudrashtadhyayi, the mantra appears in the 5th chapter (also known as Namakam) verse 41 as Namah shivaya ca shivataraya (Sanskrit: नमः शिवाय च शिवतराय च).