Search engines use web crawlers or spiders to gather information from websites. The spiders follow links across websites to index pages and save them to the search engine's database. When a user searches for terms, the search engine checks its database for matching pages and returns the results as an HTML page of links. Clicking a link then accesses the full document from the search engine's database.