Traditional search engines as we know them today produce results to queries by relying on algorithms that combine different keywords, how often a page is referenced, content quality, how fast the page loads, amongst other things.
These factors determine what the search engine thinks will be the most helpful response.