As Nick pointed out, there is an option in 'Catalog Settings' to 'Automatically write changes into XMP'. I personally turn it off because I do not want to update my files that often (for performance and backup synchronization reasons). However, you can manually write metadata, keywords, rating, labels and develop settings by selecting one or more files and using 'Metadata > Save Metadata to File(s)' (Ctrl+S or Command+S). You can also click on the 'Metadata File Needs To Be Updated' icon (a down arrow) in a thumbnail in the Grid view, then click Save.
The extent of this update depends on the file type. For a DNG file, this will pretty much copy everything currently in the catalog and pertaining to that file back to the file. For a RAW/CR2 file this will update the sidecar. For a JPG, TIFF and PSD file this will update the tags, some EXIF info and potentially a sidecar if the "Write develop settings to XMP for JPG, TIFF, and PSD" option is On.
This is explained in more details with a few useful tables here: http://www.adobepress.com/articles/article.asp?p=1211707