You can display the user’s gravatar with echo get_avatar( $id|$email );.
Maybe I’m misunderstanding your question, but you cannot update a user’s gravatar, the user must do this themselves at the gravatar.com site. You can alter the default return value of get_avatar()
with the ‘get_avatar’ filter. With the filter you could even substitute an image from your site, perhaps with an image the user uploaded. You might try searching for a plugin that handles local avatar images. From a user standpoint, the default gravatar system works well. I would not want to upload an image just for your site, I can do that at gravatar.com.