Name and why it is called so
The surah takes its name from the word al-nas, which means people or mankind. This word occurs five times in this short surah, and the Quran ends with it. This surah and Surah Al-Falaq before it both begin with "Qul a'udhu" (Say: I seek refuge), so the hadith call them together "al-Mu'awwidhatayn," the two surahs of seeking refuge.
Time of revelation and background
According to the well-known view it is a Meccan surah, while some scholars have called the Mu'awwidhatayn Medinan. Sahih Muslim reports from Uqbah ibn Amir (may Allah be pleased with him) that the Prophet ﷺ said: Verses have been revealed tonight the like of which have never been seen, and then he named Surah Al-Falaq and Surah An-Nas. Sahih al-Bukhari establishes that Labid ibn al-A'sam, a man of Banu Zurayq in Medina, worked magic on the Prophet ﷺ and Allah cured him, but the chains of the narrations saying that the Mu'awwidhatayn were revealed on that occasion have been criticized.
Main themes
In the first three verses refuge is sought through three attributes of Allah: He is the Lord of mankind who nurtures them, their King whose command is carried out over all, and their Ilah (the One worshipped), besides whom none deserves worship. In this way Allah's lordship (rububiyyah), kingship and divinity (uluhiyyah) are all mentioned in one place.
Then the evil from which refuge is sought is "al-waswas al-khannas," the whisperer who withdraws when Allah is remembered and returns when a person becomes heedless. He puts evil thoughts into people's breasts, and according to the last verse such whisperers are from among the jinn and from among people. In Surah Al-Falaq refuge was sought from outward evils, while reflecting on the meaning of Surah An-Nas shows that here refuge is sought from the evil that enters the heart and harms one's religion.