No one really knows the exact metrics that go into deciding how valuable a link is, but it quite clear that all links are not equal.
At one end of the scale there are all sorts of spammy types of links. I will define these as any type of link that adds no value to the web and is created purely for the sake of getting a link, normally for SEO. (I know that is pretty vague but I want room to wriggle!)
In times gone by and up to fairly recently, these links have been very effective. Google is getting smarter all the time though and their number one enemy is spam. Spam sites, spam content and spam links. So unsurprisingly, these links have been devalued to one degree or another. What is more, it seems that having those types of links pointing to your site now may actually harm your rankings.
So, if we ignore all of these types of links, and look at links that a normal site may have aquired in a more or less natural way, we would probably find, links from friends blogs, local contacts, forums that you participate in etc. These links are fine. They are clearly not spam and those sites probably have a small amount of trust and authority. They are unlikely to help you much though in terms of rankings for any competitive terms.
One link from a industry specific site of reasonable quality and age will more than likely have a larger effect than all the rest put together and one link from a world-wide recognised name like the BBC or CNN would probably give you a boost that is an order of magnitude greater.
So what factors influence the actual quality of the link? In no particular order, you should think about:
Relevance of the site to your keyword
Relevance of the page
Relevance of the text around the link
Quality of the site, age, freshness, original content etc.
Prominence of the link
Number of outbound links and their target
Alexa rankings to gauge popularity of the site.
These are of course just a selection and there will be many more factors, but these should get you thinking about where to get the best links for your site.