Hi,
Your laptop may have overheated that's why is shuts down by itself.
- Remove the battery and AC adapter then press and hold the power button for 20 seconds and try booting it back up. Once it's on you can connect the battery in as well.
- If that doesn't do the trick try and reseat the RAM. Take them off and put them back in making sure they are all seated properly.
- Next is, if there are light indicators on your laptop telling you that's it's on but there's no display and fan is spinning, connect and external monitor and see if you'll get any display from it because if you do that means that there's a problem with your display.