The following video demonstrates the basics of how to recover files from a dead computer.
This technique works in Windows, Mac, and Linux.
Also, this usually works if your computer still powers on but you can't boot into the operating system. I have also used this method to restore files from a hard drive that has "bad sectors".
Once you have removed the hard drive from your computer, you can access the data from the hard drive using another computer and a hard drive docking station or drive enclosure.