Links are basically bridges. Search engines use links to crawl the site. They go through the links between individual internal pages on a specific site and links between several websites. Links quantity help the search engine to discover new pages and sites and determine how high a particular page or site should be ranked in search results for specific targeted keywords.
However, Google examines all the links coming from external websites as well as their quality. If the link portfolio is better than your competitors, you will have a great chance of earning a spot above them in the SERPs.