There are a few things that can cause that, overheating and battery exhaustion being the primary ones. A few questions here may help isolate your issues.
1) what surface is the laptop used on?
2) what activities (web browsing, gaming, watching movies) cause the computer to shut down?
3) how old is the laptop?
4) is the laptop used primarily on battery power or plugged in?
5) have you upgraded/updated anything in the laptop?
Sorry for all the questions but, it'll help.