Why does my laptop shuts down when playing games

I have a Packard Bell laptop bought like 1 year ago. I was very pleased with its performance until 3 days ago. I installed some games, and I started playing. But, after about 20-30 minutes of playing, the laptop shuts down. I have absolutely no idea why is this happening. Someone told me it might be a cooler, or the game not supported, or stuff like this. I know that you guys can help me, and tell me exactly how come the laptop shuts down when I am playing games.
