If you aren’t prepared in advance, you will most likely have to use a data recovery service or data recovery software solution to help get back as much as you can of what was lost. This can be a very good idea if there is no other way to recover your files, but it doesn’t have to come to that in most cases.
This is a classic situation of where an ounce of prevention is worth a pound of cure. A very simple backup routine that is adhered to on a daily basis can usually solve any data loss situation quickly and fairly painlessly. And it won’t cost you anything but the time neded to restore the data files from your backups, and maybe the program files from the original disks.