Not long ago, Gravatar (globally recognized avatar) was new and shiny, and people were implementing it into their blogs. Gravatar has since become easy to implement and users can simply put in their themes comment.php file:
<?php echo get_avatar( $comment, 32 ); ?>
Where 32 would designate the pixel size of the image that the blog owner wants to allow to be seen on their site.
However, what about those wanting to call the Gravatar to the author of a post? That can of course be done.
What you want to do is retrieve the blog author’s email address and get the avatar if the author has a Gravatar account. You can apply this to your index.php, single.php, comments.php, archive.php where you want the author’s avatar to show on the post.
$author_email = get_the_author_email();
echo get_avatar($author_email, '32');
Again, 32 is the pixel size to display the avatar. You can adjust this number to what size you wish.
Update: However, although the code has simplified and changed since this post originally was published, most frameworks should already include gravatar. In the case it is not, you should apply the code to your comments.php. However, if your site does, you can go to your WordPress backend at Settings> Discussion, and scroll towards the bottom. It will ask you if you want to allow gravatars to show or not.
You can see more documentation in the WordPress Codex about Using Gravatars. If you do not have a Gravatar account, you should really consider getting one. It is free and much better than the default mystery man that shows up in the comments if a person has no account with Gravatar.