The issue of how search engines determine relevancy goes to the heart of SEO.
To answer this question some people use the example of a library: if you were to walk up to a Librarian and say “Novel”, they wouldn’t really know how to help you. They would likely need to ask you a few questions, such as: Do you want to see ALL novels? Are you looking for a specific genre? Are you looking for a specific novel within that genre? A specific author? Etc.
Search engines try to match you to your needs in similar fashion, but without the assistance of a human Librarian. What they use instead is a complex algorithm. When someone types the word “novel” into a search engine, that search engine’s algorithm instantly scours the internet to find sites relevant to that specific query. In effect, search engines are asking websites questions to determine whether to show them in the results.
Now for the “fun” part: These algorithms are among biggest secrets of the internet. Google, Bing & Yahoo don’t reveal what criteria they use in ranking results. Their core business is advertising based on providing accurate search results to users, and were they to reveal their secret algorithms it would be safe to assume sites would skew the results by attempting to game the specific criteria, instead of simply producing good websites.
The good news is there are some pretty smart people working in the SEO industry who devote a lot of time to examining what are most likely the criteria used by search engines. It is an ever-changing area (I can’t emphasize this enough), but most recently those criteria seem to include, (in a really tiny nutshell):
2. Keyword usage
3. Social Media
4. Site traffic
Achieving a balance of these criteria, and being attentive to maintaining that balance over time, should produce a positive result for your site.