Once search engines have crawled pages on the web, they can extract the content of those pages and add it to their indexes. In this way, they can decide if they feel a page is of sufficient quality to be ranked well for relevant keywords. Google created a short video to explain that process. When they are deciding this, the search engines do not just look at the content of the page. They also look at the number of links pointing to that page from external websites. And the quality of those external websites. Generally speaking, the more high-quality websites that link to you, the more likely you are to rank well in search results.
It was so effective because it was based upon the idea that a link could be seen as a vote of confidence about a page, i.e., it wouldn’t get links if it didn’t deserve to. The theory is that when someone links to another website, they are effectively saying it is a good resource. Otherwise, they wouldn’t link to it, much in the same way that you wouldn’t send a friend to a bad restaurant.
But soon enough Google started to discount a number of link building techniques that were previously deemed fine. For example, submitting your website to web directories and getting a link in return. This was a technique that Google actually recommended at one point. But it became abused and overused by SEOs, so Google stopped passing as much value from that sort of links.
More recently, Google has actively penalized the rankings of websites who have attempted such overuse of these techniques—often referred to as over-optimisation—in their link building. Google’s regular Penguin updates are one such example. Knowing which link building techniques to avoid and stay within Google’s guidelines is an important part if you want higher rankings for longer time.