If you could provide more info about your problem then maybe we can come up with a possible solution or pin point what's causing it. Info like:
- does it shutdown as soon as you turn on your computer? or just as it loads the desktop? or after 15 mins of use?... something specific.
- what's the last thing you're doing before it shutdown?
-- just browsing, saving file in excel or any microsoft office application, etc etc.
- what operating system (OS) are you using? and the version
- have you installed a new hardware?
- are you receiving any error messages or notifications before it shuts down?
for now, i could suggest you to check your CPU fan, or any or any other fans on your computer. They should all be working especially those which have direct contact with your motherboard.
this is for windows:
try to open command prompt (start > run > cmd :administrator), type "sfc /scannow" then enter. after that, reboot.
then try "chkdsk /f /r /x C:" <<<< C drive or whatever drive letter you have your OS on. then enter, restart your computer and let the system perform a check disk.