Well, the two biggest issues with laptops are getting power to components and trying to cool them. You've got to realize that even higher-end PCs are hard to keep under the right operating temps.
Depending on your hardware, your laptop should be anywhere from 95 degrees to 120 degrees internally without any problems. So it's going to feel hot to the touch. However, if it's so hot it actually burns you or feels close to that, then you have a pretty big issue.
How is the charge on the battery? Laptop batteries go old after about a year of extensive use...or 3 years of light usage. It might just be time for a new battery. Though I doubt this is it, there is a possibility of software causing this (viruses included)...but you'd see the shutdown screen and it wouldn't immediately power off.
I'd recommend taking a few simple steps to make sure it's not something silly:
Take out the battery and clean the contacts really well to make sure it isn't any problem with the battery dropping below the juice needed to get past the dust or something (happens more often than you'd think).
Plug the computer in and just let it sit for an hour or so and see if it does it. If it does, we can obviously throw the battery theory out the window.
Open up the laptop and let it run open. You can even have a regular fan blowing on it too. This can help determine if it is overheating without making you learn how to use BIOS.
If it continues with the problems after you look into everything above, you should probably weigh your options of taking it into a computer store, sending it back to the manufacturer (is it under warranty), or trashing it and buying a new one.