How Search Engine Works?
Each Search Engine (google, Yahoo, bing) has its own automated program called a “Web Spider” or Web Crawler.
The main purpose of web spider to crawl your web-pages, read and collect the content and follow the links (internal and external both).
The web spider then brings back the information that is crawled and deposits the collected data into the search engine database.
When searcher enters the query in the search box of a search engine’s job is to find most relevant search result to the query to the information in it Index.