A lot of big and small things go into calculating search engine rankings. For instance, Google claims they use over 200 factors to determine the position of sites in their results.

Some of the most important factors can be guessed using common sense. Considering that search engines are actively trying to rank quality sites higher to offer the best possible results to users, it is assumed that anything that improves the perceivable quality of our site and pages will improve the site's rankings.

So, things like good content, good titles, good navigation, relation between page title and page content, good urls, proper code, compliance with standards, etc, will improve the perceivable quality of our site.

On the other hand some of the most important factors that determine ranking are focused on assessing the online reputation of our site. It is assumed that a site that is important / high quality will receive a healthy amount of in-bound links (IBLs) from a wide array of sources. Search engines also pay attention to the anchor text used to link to our site, and they also give more weight to links coming in from authority sites, specially if those are authorities from the same field as our site's content.

If you want to learn more about the details of search engine ranking, take a closer look at the Search Engine Ranking Factors as categorized by a panel of experts.