You can in some cases recover data from a hard drive that won't spin.
In some cases the hard drive might be able to be repaired so it will spin again.
It's pretty common to take a hard drive that is not working and open it up and fix it.
A good data recovery place or computer shop that can fix hard drives can often fix the hard drive.
However if the hard drive will not spin and cannot be fixed then recovery of the data would be impossible.
It's important to back up data in multiple places both online and on multiple hard drives and thumb drives.
If the hard drive detects but you can't access it, try some reliable recovery software like Recuva, Photoec, or TestDisk (the latter two are more technical but quite powerful).
You'll need to have the hard drive spinning before it will allow you to recover any data.