Basically Lightroom is an image database program with image editing capabilities. By default, LR stores all the changes that you make to your images in a database name LRCAT which you can find if you navigate to the folder named Lightroom within your Pictures folder (assuming you are using the default directory for your photos). So, the actual photos are not being changed at all, rather the database makes a record of what changes are to be made. Here is the problem with that: if you lose your database, then all the changes you made to your images have been lost. This includes the keywords, metadata, and all the development settings.
Fortunately, a corrupt LR catalog is uncommon. Additionally, you should regularly be making a backup of the catalog. Each time you launch LR, it prompts you to create a backup of your catalog. I suggest you start doing it. That way if you somehow lose your catalog, you can go back to the most recent version. Also, LR has the ability to "repair" a corrupt catalog. It will prompt you should it find that your catalog is corrupt and ask if you want it to attempt a repair. I have not experienced this myself, so I don't know how effective it is. From reading forums and the like, it doesn't always work.
Click here to an alternative method of repairing the LR catalog. Again, I haven't tried this as I haven't had the problem. Knock on wood.
Two other things to consider are pushing the edits and metadata to xmp sidecar files. This is to say that little companion files with the edits will be saved alongside the edited RAW files. The advantage of this is that even if you lose your LR catalog altogether, the develop and keyword data will still be available (the collections data won't be though). The disadvantage of this? When you open your images in PS, it will look at the sidecar edits rather than the LR edits from the catalog. This isn't an issue if you occasionally "push" the LR edits to the sidecar files. This happens by itself over time, but you can make it happen immediately.
Lastly, if you convert your RAW files to DNG files upon import, the metadata is saved in the RAW file itself as well as in the catalog. I am pretty sure you would still lose your collection information, but everything else would still be there. This is the route that I have been taking as of late. The only foreseeable problem with that is that you will not be able to edit that file with an RAW file that doesn't support DNG format. For example, you would not be able to edit a DNG file with Nikon Capture even though it was taken with a Nikon camera because it only support NEF files.
Something to chew on. The biggest take away is that you need to regularly backup your LR catalog.