The nofollow attribute is an element that can be added to a link on page to signal to search engines that link does not represent a trusted endorsement of the target URL, and no link juice should be passed to the target URL.
The nofollow attribute was created in response to combatting websites that intentionally manipulate search engine rankings through use of linkspam. Most search engines' webmaster guidelines require the nofollow attribute to be used on external links on their site that do not represent an actual trusted, editorial endorsement of the target page. This includes:
Paid links or advertisements
User-generated content (such as comments)
While the nofollow tag literally implies that search engines should not follow or crawl the link, there is much evidence supporting that in many cases search engines do in fact crawl the links, but may not index them or pass any link juice to the target URL.