If a program messed up and you get that blue screen, you can just reboot. Your computer will still have all of its data, but if you were working on a document and hadn't saved, those changes will be lost.
However if your computer crashes in such a way that it cannot be rebooted, that generally means the hard drive has died. While it might be possible to recover your data from a damaged drive, it's an extremely slow process and may not be able to recover all your data - or anything at all.
Therefore you should have some sort of backup system in place. There are many that can either backup to an external hard drive, or even copy files to the cloud. Either way the only files you should be very concerned with are your documents and photos - basically anything that you can't simply reinstall or redownload.