There are two types of links that you need to be familiar with: do-follow and no-follow links.
A “do-follow” link tells search engines that this link is good and that you don’t mind if the links helps them rank higher.
A “no-follow” link tells a search engine that the link isn’t approved by you or that it is paid and that the link shouldn’t help the site rank higher.
In general when you are using affiliate links or paid links you should no-follow the link. This way you aren’t helping to manipulate Google and cause these sites to rank higher.
If you sell backlinks and “do-follow” them, you can potentially get penalized.
And if your website contains user generated content, such as message board or blog comments, no-follow the links.
When you are citing a source, even if it is a competitor, you should do-follow the link.
Now you know the difference between those two link types and when you should use them.