Guest blogging is the practice for the blog owner of inviting an external author to post on its own blog. Guest blogging is sought by many potential guest writers for visibility and SEO purposes.
Writing for other blogs is a means of getting dofollow backlinks on potentially high quality and reputable blogs and these backlinks are good for SEO. Those links are generally in an author’s presentation or signature.
On a blog, links in the post are usually dofollow links and links in comments are nofollow links to prevent comments spam.
For the blog owner, guest blogging is a way to get quality content.
The Google’s view on guest blogging for links: