Once a query is entered, nearly instantly, the search engine will sort through the millions of pages it knows about and present you with ones that match the topic. The matches will even be ranked, so that the most relevant ones come first.
So how do crawler-based search engines go about determining relevancy, when confronted with hundreds of millions of web pages to sort through? They follow a set of rules, known as an algorithm. Exactly how a particular search engine's algorithm works is a closely-kept trade secret. However, all major search engines follow the general rules below.
... full article