Summarize this article:

If your hard drive is still spinning but you're encountering performance issues, it's best to stop the hard drive from running as soon as possible. Once you've turned off your computer, don't turn it on again until you can take it to a professional repair service. If you're worried about an external hard drive malfunctioning, you can simply unplug it from your computer. If you can get your hard drive to work on a computer other than the one in which it currently resides, the problem isn't necessarily with the hard drive itself--it's with the cables or the ports on your computer.  If you're using an external hard drive, this is as easy as unplugging it from your computer and plugging it into a different one. You'll also want to try a replacement cable in case the old one is malfunctioning. Internal hard drives present a more complicated problem. In order to diagnose your internal hard drive's connection health, you'll first need to remove the drive from your computer. After doing so, you can buy a hard drive docking station or a USB cable converter (Amazon sells both) that allows you to connect your external hard drive to another computer. Before removing a hard drive, make sure your computer is unplugged and the battery is disconnected (if applicable). Removing a hard drive is an incredibly difficult task on a Mac. If you intend to do so anyway, proceed with caution. In rare cases, a hard drive failing to work on your specific computer (but working on others) can be symptomatic of a failing motherboard. If you can get your hard drive running on any computer other than your own, you should take your computer into a tech company somewhere to get it checked out. Hard drives have three distinct components that are likely to cause a drive failure if they malfunction:   PCB - The circuit board (usually on the bottom of your hard drive) controls most of your hard drive's functions, as well as translating hard drive information into readable information. Circuit boards are typically green.  Platters - Thin disks that store data. Platters are responsible for most of the noise you hear when your hard drive starts up. Unless you're a professional with access to a clean room and the necessary equipment, you won't be able to fix your hard drive's platters on your own.  Head Assembly - The head assembly is what reads the data off of the platters. Again, you won't be able to repair the head assembly without professional-grade experience and equipment. Depending on what's wrong with it, your hard drive will make certain sounds. Be sure to cross-reference your hard drive's model with the sound it's making to ensure an accurate diagnosis.  For example: if your hard drive was making a clicking noise, it most likely has a problem with the head assembly.  Unfortunately, most problems that are diagnosable by the sound they cause will need professional care. These include things like freezing your hard drive or applying force to it. While some users may report success from these methods, performing a short-term fix on your hard drive is bound to make successful data recovery from a professional service even less likely than it already was. Even if you can get a quick fix to work, the effects are usually short-term. Your hard drive will still end up dying.

Summary:
Stop using your computer immediately. Try plugging your hard drive into a different port or computer. Know the different components of a hard drive. Assess the sounds your drive was making. Refrain from using do-it-yourself quick fixes.