Overall meaning :
The Almighty says: We also destroyed the tribes of ‘Aad and Thamud, and their fate is well known to you from what yet remains of their ruined and deserted dwellings. Satan had made their evil deeds seem fair to them and turned them aside from the way of truth, although they were sagacious and intelligent and had the ability to perceive the truth but they had chosen to follow their whims and desires!
And We likewise destroyed Korah, Pharaoh and Haman. Moses came to them with evident miracles, but they arrogantly refused to accept them, and they could not escape Our punishment. We destroyed each of these because of their sins; Upon some We sent a deadly storm of stones (the ‘Aad), some were seized by a mighty terrible blast from the sky (the Thamud), some We caused the earth to swallow up (Korah) and some We drowned (Pharaoh and Haman). It was not Allah who wronged them by inflicting such punishment on them; rather, they wronged themselves by committing unbelief and wicked deeds and denying His Messengers.