A web search engine crawls the web to find web pages, indexed them, and presents a list of pages matching the search query. There are two types of search engines. One only searches titles and descriptions of sites, and does not search individual pages. The other one is full-text search engine, which indexes billions of web pages and search them by title or content.
(Courtesy of Wikipedia.com)
Google runs on a huge distributed network of computers. It has 3 major parts.
- Googlebot, a web crawler that crawls and saves web pages.
- Google indexer that reads every word on every page and stores page index information in a huge database.
- Google query processor that processes your search query, compares with page index and recommends the webpages that are most relevant to your query.