The Google algorithm can be broken down into two major groups of factors:
On-page (keyword) factors. Keyword factors involve how, where and when keywords are used. Meaning how well your website is optimized for your most important keywords, and if those same keywords appear in your content and in links. Keyword factors determine page relevance. Off-page (link) factors. These include the quantity and quality of links that point to your site. Link factors determine page importance and a re related to Google PageRank (PR). Links play a VERY important role in getting high rankings, particularly for competitive markets. Very simply put, Google finds pages in its index that are both relevant and important to a search for a particular term or phrase, and then lists them in descending order on search results pages.