Laptop Overheating

Dear all,I have proble with my laptop (compac). I have some game downloaded from internet. when i play my game my laptop will be shut down after around half hour. I think games are compatible with my window 7. Question : why it happen to my laptop?