There has been much talk concerning the frequent changes to the Google algorithm used for ranking their search results. Hundreds of adjustments are made each year and the minute details are never made available to the public (including web developers).
That being said, there are larger patterns that have emerged from studying the way that sites rankings have changed over time and nuggets of knowledge have been gleamed from macro-level discussions with Google representatives.
The most important pattern is that content is, and will continue to be, king. However, the last few years have seen a shift from quantitative content towards a more authorative and qualitative focus. This means that Google (and to a lesser degree the other search engines) tries to determine both the quality of your site’s content as well as some measure of assumed authority within the larger niche community your site represents.
In addition to the objective measures of your existing content, Google also looks at the level of relevance presumed by third party judges (the links inbound to your site) as well as the relative trust and authority of those providing the links.
All in all, best practices dictate that the primary focus on your website should be to make sure that your content is relative, authoritative, well structured and presented in such a manner that your website can be easily found by customers looking specifically for what you are selling.