There are two fundamental ways that the search engines use links:

To discover new web pages To help determine how well a page should rank in their results

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.

Links as a ranking factor are what allowed Google to start to dominate the search engine market back in the late 1990s. One of Google's founders, Larry Page, invented PageRank, which Google used to measure the quality of a page based in part on the number of links pointing to it. This metric was then used as part of the overall ranking algorithm and became a strong signal because it was a very good way of determining the quality of a page.

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.

However, SEOs soon discovered how to manipulate PageRank and search results for chosen keywords. Google started actively trying to find ways to discover websites which were manipulating search results, and began rolling out regular updates which were specifically aimed at filtering out websites that didn't deserve to rank.

This has also led to Google starting 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 subject that we’ll discuss later in this guide.

We don't know the full algorithm that Google uses to determine its search results—that's the company's "secret sauce." Despite that fact, the general consensus among the SEO community (according to the 2015 Moz search ranking factors survey) is that links still play a big role in that algorithm. They represent the largest two slices of the pie chart below.