Hi, To start off with the most important thing is that the link is coming for a website related to your niche. A quality link would also have your desired keyword in the anchor text. The link has to be dofollow. The higher the PR of the page from where you get the link the better.
The link coming from a quality page which has information relating to your site's niche on it and which is carrying none or very few outbound links apart from yours... is considered a quality link. Regards, RightMan
yes i agree with both statements above however if you see a place to get a good link from in the sense that the site has good authority and is trusted but its not relevant then dont be shy to still get one - you will still get many benefits