HP Probook 4530s randomly turns off during work.

I have an HP Probook 4530 s that keeps on turning off according to its will. I don't know what is the problem with it. Initially I thought that this was a problem with the battery but it keeps on turning off even when the laptop is plugged in. Is this a Windows related issue? Or is this a problem with my laptop?
