When a search query is entered into a search engine by a user, all of the pages which are deemed to be relevant are identified from the index and an algorithm is used to hierarchically rank the relevant pages into a set of results.
The algorithms used to rank the most relevant results differ for each search engine. For example, a page that ranks highly for a search query in Google may not rank highly for the same query in Bing.