Companies that manufacture Hard Drives always offer a diagnostic utility for checking a hard drive to see if it's good, or bad (failing). The first thing you want to do is identify what brand your hard drive is. With desktop computers you can pull open the side of the tower and look for the label with the Brand. Next you'll want to visit the manufacturers website - Example: www.wdc.com this is Western Digitals Website
If you're hearing clicking sounds coming from your computer it is suggested that you immediately power off the machine, and take it to a local computer repair shop for analysis. The longer you leave a machine powered on with a failing hard drive clicking, the more likely it is that data recovery will be more difficult, or sometimes not possible.
First identify the type of connector being used. There are two common styles SATA (Serial ATA) and IDE (Integrated Drive Electronics). You'll know if it's IDE because it will use a ribbon that closely resembles a floppy drive. The ribbons and SATA cables are supplied in various colors including: Black, Red, Grey, White, Orange, and sometimes other colors.