A Spider Trap is the term given to a set of web pages that trap a web crawler – otherwise known as a spider – in a loop. This can be done accidentally, via a poor combination of webpage links or a sitemap that trap visiting spiders. However, it can be done intentionally by deliberately setting up an infinite loop in which the spider is trapped.
With a spider trapped in such a loop, the spider’s resources are used up and the programme itself may crash. There is no benefit from an SEO perspective of setting up a spider trap. In fact, it’s likely to harm a website’s page rank.