The word "namas" is a sansrit word (called avyaya).It means to salute or bow down to some one.
'Namas' plus 'karah' (coming from root "kri" meaning doing) makes it namaskara.
And Namas plus te becomes namaste which means salutations to you.
Pranama comed from 'Pra' (a praatipadika) plus 'ghanh' pratyay of the root "nam' (meaning bowing down). So Pranama means the act of prostration.
Namaskara or Pranama is in fact a full-fledged spiritual practice in itself.
Taittiriya-Upanishad says(3/10/4)
Tan nama ityupasata. namyante asmai kama
Meaning: Worship God by namaskara. You will get whatever you want.
In Srimad-Bhagavad-Gita, God Himself says in two different chapters(9/34 & 18/65):
mam namaskuru meaning "offer proname to Me".
He declares that it isa way to reach Him.
In the Pandava-Gita, we get:
ekoapi krishne sakrit pranami dasaswamedhi na cha jaati tulyam/daswamedhi punareti janma krishna-pranami na punarbhabaya
meaning, even one pronam to Sri Krishna is not comparable to ten ashwamedha jajnas. The doer of the ten jajnas is born again, but who pronams Sri Krishna becomes liberated.
In Anu-Smriti, God says:
nama etyeva jo btuan madbhaktah sraddhyamnwitah/tasyakshayo bhavelloko swapakasyapi Narada
meaning: Even if an outcaste offers pronam to me once with devotion and respect, he or she is liberated.
In Narasimhaputpran, we get
Namaskarah smrito jajnah sarvajajneshu chottamah/namaskarena chaikena namah puto Harim vrajet//
Meaning: Namaskara is the best among all spiritual practices(jajnas).Just one namaskar to to Hari by one makes him or her purified by namaskar and reach God.
In Skanda-Purana we find
Danda-pranamam kurute vishnave bhaktibhavitah/Renusamkhyam vaset swarge mannantwraam satam narah
meaning: Who who prostrates God falling on earth with devotion, stays in heaven hundred mannantwaras per dust stuck on his or her body.
And, also
chhadenaapi namaskaram kutbato Sarnagadhanwane/ satajanmaarjitam paapam tatkshanadeva nashyati//
Even if someone offers oronam to Vishnu deceptively, his or sin accumulated sins of previous hundred births are destroyed instantly.
Hari-Bhakti-Sudhodaya says:
Vishnor dandaprnamena bhaktena oatataa bhubi/patitam paatakam kristsnam notthisthati punah saha//
Meaning : When the devotee falls on earth to prostrate God, all his sins fall on ground. He stands up but these can not.
Brahmanda-Purana says:
kritwaapi vahusah paapam naro mohasamanwitah/na yati narakam ghoram natwa paapaharam harim
Meaning: If someone with attachments and grave sins pays namaskara to God, does not have to go to the fierce hells.
Tantrasaara says
bhumau nipatya jah kuryat krishne ashtanganatim sudhih/sahasrajanmajam paapam tyaktwa vaikuntham aapnuat//
Meaning: The wise person who prostrates Sri Krishna falling on the earth,is freed from sins of thosand previous births and goes to Vaikuntha.
Yamagita says : The yamadutas myst not touch someone who offers pronams to Hari with devotion.
Sri Ramakrishna says in His Kathamrita (page 382,2 February 1884) : If you do not find any time to worship God, just do two pronams sincerely--one in the morning and one in evening, that will be enough.
So our Scriptures and saints glorify namaskar to God unianimously.
Now about namaskara to others. Manusamhita(2/10/121) says
When a senior person comes in front, the life-force of a junior person rises towards head and after offering namaskara to the senior, returns back to original position. namaskara to seniors raises lifespan, education, fame and power.
There are many more slokas in different scriptures glorifying namaskara to men and God.
Interested ones will get them all in Sahaja Sadhanaa, Sitaramdas Omkarnath,Mahamilan Math vol.1, page 431-446.