As you most likely know, when you search for something online the search engine you use will quickly sort through millions of pages to present you with those which closest match your search query.
While the search engines are not perfect they do a remarkable job as you most likely will find what it is you are searching for. How do search engines go about determining relevancy anyway? The answer is that they follow a set of rules known as algorithms. No search engine reveals how its algorithms work but most use location and frequency of keywords as key rules.
The typical search engine also checks to see if the keywords appear at the top of a web page. They assume that the most relevant pages will make use of the keywords at the top so good SEO involves keyword-rich content that includes the keyword(s) in the title and first paragraph. Frequency is another factor that search engines take into consideration as the more times a keyword is used on a web page, the search engines tend to ‘think’ that the page has relevancy.
Search engines are on the constant lookout for spammy pages. Web pages which have the same keywords appearing over and over again are quickly de-indexed once a search engine discovers the spamming efforts.