For many generations Noah's people had been worshipping statues that they called gods. They believed that these gods would bring them good, protect them from evil, and provide all their needs. They gave their idols names such as Waddan, Suwaan, Yaghutha, Yaauga, and Nasran, according to the power they thought these gods possessed.
Allah the Almighty revealed: And they Idolaters have said: "You shall not leave your gods, nor shall you leave Wadd, nor Suwa, nor Yaghuth, nor Yauq nor Nasr (names of the idols). " Surah 71: 23
Originally these were the names of good people who had lived among them. After their deaths, statues of them were erected to keep their memories alive. After some time, however, people began to worship these statues. Later generations did not even know why they had been erected; they only knew their parents had prayed to them. That is how idol worshipping developed. Since they had no understanding of Allah the Almighty Who would punish them for their evil deeds, they became cruel and immoral.
Into this environment Allah sent Noah with His message to his people. Noah was the only intellectual not caught in the whirlpool of man's destruction which was caused by polytheism.
Related Quran Ayaaths of this Hadith.
Surah 6 : Ayah 84 Surah 4 : Ayah 163 Surah 11 : Ayah 25 Surah 11 : Ayah 32 Surah 11 : Ayah 36 Surah 11 : Ayah 40"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari