$USER->profile is an array of custom field data, in the format shortname => value.
As for updating the value, you could take a look at the profile_save_data() function in profile/lib.php to see how the values are saved when you edit the user profile page.