Al-Ankabut (Arabic: العنكبوت, romanized: al-‘ankabūt, lit. 'The Spider') is the 29th chapter (surah) of the Quran with 69 verses (āyāt).
Regarding the timing and contextual background of the revelation (asbāb al-nuzūl), it is a "Meccan surah", which means it is believed to have been revealed in Mecca, instead of later in Medina. It was revealed around 2-3 years before Hijrah, in a later stage of Muhammad preaching in Mecca.

The surah states that Nuh, Ibrahim, Lut, Shuaib, Hud, Saleh, Musa and Muhammad all were prophets of God and endured hardships. For example, Noah was ridiculed often, and Abraham was thrown into the fire. But God destroyed their people who transgressed. Verse 40 says So each We punished for his sin; of them was he on whom We sent down a violent storm, and of them was he whom the rumbling overtook, and of them was he whom We made to be swallowed up by the earth, and of them was he whom We drowned; and it did not beseem Allah that He should be unjust to them, but they were unjust to their own souls.

Summary
1-2 Religious faith is proved by trials
3 Evil deeds will surely be punished
4-7 The righteous shall be rewarded for their good deeds
8 Parents not to be obeyed when they oppose God's law
9 Salvation by faith and good works
10-11 Hypocrites exposed and rebuked
12-13 Unbelievers shall be punished for deceiving others by false promises
14-15 The enemies of Noah drowned for their unbelief
16 Abraham preached against idolatry
17 Abraham accused of being an impostor
18-19 He shows the idolaters how God's power is manifested in nature
20-22 He declares that none shall escape the judgment of God
23 His people attempt to burn him, but God saves him
24 He discourses against the idolatry of his people
25 Lot believes in Abraham, who determines to fly his country
26 God gives Abraham descendants who possess the gift of prophecy and the Scriptures
27-34 The story of Lot and his ministry in Sodom
35-36 Shuaib's ministry to the unbelieving Madianites
37 ʽAd and Thamúd destroyed in unbelief
38 Qárún, Pharaoh, and Hámán destroyed in unbelief
39 Various means by which God destroyed infidels
40 Idolatry likened to a spider's web
41 God knoweth the idols worshipped by men
42-44 God's works and signs only understood by true believers
45 Muhammad is commanded to recite the Quran and to give himself to prayer
46 Muslims not to fight against Jews and Christians except in self-defence
47 The miracle of Muhammad's reading and writing a proof of the inspiration of the Quran
48 Unbelievers only reject the Quran
49 Muhammad challenged to work a miracle
50 The Quran itself a sufficient miracle
51, 52 God will judge between Muhammad and the infidels
53-55 The infidels call for judgment, and it will find them unprepared
56 Believers exhorted to fly from persecution
57-59 The reward of the righteous dead
60-63 God's works in creation and providence witness his being
64 The present life a vain show
65, 66 Unbelievers are ungrateful
67, 68 The ingratitude of the Arab idolaters
69 God will reward the faithful

Parable of the spider's house
The parable of those who take protectors other than God is that of a spider spinning a shelter. And the flimsiest of all shelters is certainly that of a spider, if only they knew.
Mustafa Khattab, author of the Clear Quran, notes that "Externally, the web is too flimsy to protect the spider against rain and strong wind. Internally, the spider’s family structure is fragile, since some species are cannibalistic, with the female preying on the male and the young eating their own mother."
From Tafsir Ibn Kathir:
"This is how Allah described the idolators in their reverence of gods besides Him, hoping that they would help them and provide for them, and turning to them in times of difficulties. In this regard, they were like the house of a spider, which is so weak and frail, because by clinging to these gods they were like a person who holds on to a spider's web, who does not gain any benefit from that. If they knew this, they would not take any protectors besides Allah. This is unlike the Muslim believer, whose heart is devoted to Allah, yet he still does righteous deeds and follows the Laws of Allah, for he has grasped the most trustworthy handle that will never break because it is so strong and firm."

References

External links
Quran 29 Clear Quran translation
Works related to The Holy Qur'an (Maulana Muhammad Ali)/29. The Spider at Wikisource
Q29:2, 50+ translations, islamawakened.com