There can be many options here, from the performance of your computer to what software you have installed.
Alternatively, while playing the game, use the task manager (if you are using Windows) to determine the amount of free RAM. RAM should be no more than 85% full.