Two ways:
1. Run the System Restore Disk that shipped with your computer.
2. Run a higher retail point release than the one which shipped with your computer. For example: If your computer shipped with MacOS X 10.2.7, you can install MacOS 10.3 or MacOS X 10.4.
What makes you think that your hard drive is faulty?