touch the side of your laptop. if its burning your hands, i recommend you let it cool down, especially if theres some whirring sound coming out of your laptop. that means the fan is trying very hard to keep it at a low temperature. put it by an ac (set on cold, ofc) for 10 minutes and it should get better. also, you can be blocking the fan by putting it on the bed, or a desk, even if it's a laptop. the air needs to circulate under your laptop. your fan or filters might be dusty or dirty too.
it might be a battery problem as well. try getting a new battery if it's really old, because sooner or later they just give up.
probably not what you have either, but it could be some virus on your computer that's causing it to constantly shut down. if thats the cause i cant help you with that.
oh and if your laptop is a dinosaur, just get a new one. no windows 95 comps allowed.
did some doodoo research and got some stuff.