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.