This is really a crucial problem that a Laptop overheats and shut down automatically. This happens normally because your cooling Fan is not working properly. So you need to consider Change in cooling Fan. You need to follow some precautions while using Laptops.
Just place sufficient place for hot air to escape out.
Keep books or other things below Laptop
Add External coolers if possible.