A search engine, or web search engine, is software which is designed to search and retrieve information on the World Wide Web.
A search engine uses web crawling, indexing and search processes in near real-time in order to search information on the World Wide Web.
The first process used by a search engine is web crawling, whereby the search engine typically sends out a spider to go from website to website to fetch as many documents as possible. Then, via indexing, the information sent back by the spider is indexed.
Indexing depends on many factors, such as titles, page content, headings, or metadata in HTML meta tags, among other fators.
Indexing means associating words and other definable tokens found on web pages to their domain names and HTML-based fields. Usually when a user inputs a query into the search engine, the index already has the names of sites containing the keywords or phrases used in the query.
Search results are retrieved from the index and the engine usually employs an algorithm in which to rank the relevance and quality of each result. These algorithms are usually trade secrets and differ from engine to engine.