"Is it safe?" Yes.
"It asks me to install the OS and I don't want to mess my drive and its contents."
Apparently your drive is already "messed," but you are wise to stop there. You're right that you COULD lose data.
If you are on Tiger or Leopard, you can do an "archive and install" which will not disturb your data. If you are on Snow Leopard you don't really have this option.
It should go without saying -- but I'll say it anyway -- that what you should really be doing is finding a way to back up your data. The hard drive could be failing.
If you're not using Time Machine already, first kick yourself and then take it to an Apple Authorised service place so they can do the backup for you. They will also test the HD to make sure its not failing.
Once a backup is done, you can do a fresh install of the system and restore from your backup (if necessary).
The main thing here is that we (nor you) actually know what is the root cause of your problem yet, so my advice is to a) backup and b) let a tech tell you what's really going on.