It depends on what is crashing your computer. Do you get any error messages or the Blue Screen of Death showing briefly? Does the computer slow down and finally shuts down? These kind of errors are generally indicate a problem with the operating system. If the computer shuts down very quickly, this may be a heat problem with your computer. Most hardware problems are consistent and shut down or not start up at all.
The cost to reinstall the operating system should not be too much and you can probably do it your self. Repairing hardware depends on the part that failed, the system board is a higher cost to repair than memory. A good tech should be able to sort out if the problem is hardware or software and give an estimate of repair cost.