Lightroom stores most editing adjustments, ratings, keywords, captions, and other metadata in its catalog. If you choose Metadata --> Save Metadata to File, Lightroom can also write much of that information into XMP sidecar files (for RAW images) or directly into JPEG, TIFF, DNG, and PSD files.
The original image pixels are never altered. Develop settings, keywords, copyright information, ratings, and labels can be saved as metadata, while collection membership, virtual copies, stacks, and some catalog-specific information remain stored only in the Lightroom catalog.
If you're moving photos between computers or applications, it's a good practice to save metadata to files so your edits and keywords travel with the images.