To understand the comcept of do-follow and no-follow links we must first understand how the search engine works.
so when we search anything on search engine there is crawler then is working behind and it crawls through the different millions of webpages that are having similar keywords that you have mentioned while searching on the search engine bar.
So this crawler go to page to page and look for the most relevant pages, now the thing is if any page contains links in it( either in comments section or in the main bidy text) the crawler jump to the page that is linked to and this is also one of the reason to increase creadibility of your webpage.
Now if we look to the no-follow links, actually no-follow is the attribute of a HTML tag called anchor tag, this tag doesn't let the crawler to jump to the link that is linked through this anchor tag, whereas for do-follow link it allows the crawler to jump to the respective page.
Also the value or creadibility score for do-follow link is more than a no-follow link