Assuming you do not adopt an aggressive or keyword-focused approach, building links is a legitimate and effective activity to improve search performance. However, it is not a numbers game - high quality links are crucial. You want search engines to see the relationships you have with other websites, and that the company you keep is trustworthy.
A "good" link will usually have some or all of these characteristics:
Authority and trustworthiness are somewhat complex subjects to define simply, however it is easier to trust your instincts. Sites like the BBC or Wikipedia, for instance, are obviously trustworthy and authoritative, and the same characteristics can also apply to smaller websites - for instance a local news website or a very specialist site about a particular subject. Look for sites that you would be quite happy for your own customers to visit, or see that you are connected with.
Google is mainly concerned with the idea that links are "natural" and have arisen during the course of normal website activities. For instance, a news article that references a company provides a link to their website or a supplier links to a customer's website from a testimonial. These links tend to be varied, and a typical business website will have links from a number of different sources. Very few natural links will include keywords within anchor text, unless those words form part of a company name. The majority of links will use:
The simplest approach is to not use anchor text as part of any requests for links or when creating your own links. This minimises the risk of inadvertently adopting too aggressive a strategy and harming your site's rankings.
There should, ideally, be an obvious reason why a particular site would link to you. This might be because the site linking is in the same industry or discusses the same topics. But it might also be because of a business relationship, a link from an employee's website to their company or a link from social media.
You should avoid obtaining links from sites that are likely to have broken search engine guidelines either now or in the past. If a site "feels" untrustworthy, trust your instincts. Similarly, sites that mention SEO benefits of links from them will typically provide no such benefit and instead increase your risk of penalties.
While it may seem that obtaining links is something of a minefield (it is!) this does not mean that there is nothing you can do.