It could be either.
There could be an error in the programming.
One of the components the program depends upon could have been upgraded or changed, in a way that makes the application behavior unstable.
Or, if you are having problems with all sorts of programs, for no reason, you may be having hardware issues. In cases like this, you'll want to run some diagnostic software (such as the Apple Hardware Diagnostics) to check that the hardware is functioning properly.
Mac OS X is great because they have extensive logging capabilities (assuming the application was developed properly). Go into your Utilities folder and pull up the Console Application. In addition to showing error messages of currently running apps, you can click on the LOGS button and review logs from the past. Usually there is helpful information in these logs that can pinpoint the cause of the crash.