A cobweb (derived from coppe web, coppe being an old word for spider) can either be any spider web, or more commonly it means an old spider web that isn't being used by the spider anymore, and is gathering dust. Cobwebs are often found in old buildings that aren't cleaned very often.
Spiders spin webs between twigs (or anything) to catch insects in. Webs are sticky, so insects that fly into the web get stuck. The spider sits on the web and feels for the vibrations of a struggling insect with its feet, and then comes over to wrap it up in more webbing and eat it.