A spider web was a net-like construct of a spider containing sticky strands to catch prey. An abandoned dusty spider web was called a cobweb.
In 2267, Leonard McCoy described the dust and cobwebs covering a castle on Pyris VII as being associated with Halloween. (TOS: "Catspaw")
In 2365, when Lieutenant Commanders Data and Geordi La Forge confronted a hologram of James Moriarty, he described himself as being like a spider who feels the strings vibrate when anyone new chances into his web. (TNG: "Elementary, Dear Data")
In an alternate future, cobwebs covered the shelves of an abandoned library in the 31st century. (ENT: "Shockwave, Part II")