The attribute rel=“nofollow“ is a micro tag in the HTML-Code of a website. It is used to tag hyperlinks so it is not taken into consideration in the Google index. So it tells the search engine-robots that they are not allowed to follow the links while crawling the site.
Google introduced the rel=nofollow-attribute in 2005 and other search engines adopted it. Google asks website-operators to use nofollow links for non-editorial links. So links in guestbook-entries should not influence the development of the index. Many link builders’ use such links to manipulate the backlinkprofile of a website. For Google, backlinks are a very important criteria for the index-development, this is why they use such links in forums, guest books and other registers. This leaded to a misuse of comment-spam to change the backlinkprofile or linkpyramid. Google’s reaction was the rel=“nofollow“ attribute which should cut down the spam. 
Today the nofollow links have several applications. Two are considered legitimate by Google:
1.) First of all, paid links should not influence the algorithm for appearing in the search results, because Google also values websites by their referring links. The rel=“nofollow“ attribute is a reference, but the linkjuice is not passed on. Google recommends this so the users are not deceived by paid links. Tagging paid links with the nofollow-attribute is comparable with marking an advertisement.
2.) Secondly, marking untrustworthy content when you want to link a site but distance from its bad neighborhood. This is always the case when website operators don’t want to or can’t accept responsibility for linked content. If a user writes a comment and links a website it’s their own responsibility. The webmaster is off the hook because he didn’t tag the linkjuice. Webmasters distance themselves from the link target and tell Google to treat website and link target separately.
3.) Thirdly, using the nofollow-attribute for internal links should be excluded by the crawler. It’s still a myth that intern links are part of the website architecture. Many webmasters use “nofollow“ for linking to the imprint and other insignificant content like print templates and forms. But this has no advantage at all, infact it’s the opposite, because valuable linkjuice is neglected and according to Google it interferes the natural pagerank-flow. A userfriendly information-architecture should not be disrupted by a rel=“nofollow“-attribute, because the user is in the foreground and not the crawler. To still keep the site out of the Google index it’s wiser to use a noindex meta tag and a lock via robots.txt.
The attribute (also: nofollow -Tag) is used as an extension of links in the HTML-Code:
<a href=”http://domain.de” rel=”nofollow”>Linktext</a>
All links of a HTML-site should be tagged with „nofollow“, it’s also possible in the header:
<meta name="robots" content="nofollow" />
The latter is often used on websites on which it’s possible to leave comments, e.g. forums, guest books and blogs. So the comments are excluded by the crawler, but at the same time trustworthy users and their links are excluded, too, which in return might not be required. So a ideal control of links and the transmission of linkjuice would be the first option.
The rel=“nofollow“-attribute requires caution: It should be used like it’s recommended by Google. This is because the linkjuice-flow can be changed specifically which could appear unnaturally under certain circumstances. As the rel=“nofollow“-attribute is wide-spread, every site also has devalued links and is part of a natural (external) linkprofile. Although this assumption is justified it should be only used at specific points: with paid links or to prevent spam-comments. The attribute should not be misused to get such a profile. This could disturb the linkjuice. Using nofollow for linkbuilding requires caution.