If ur laptop is re-starting again and again after 2 hours,there might be problem with its battery.avoid using ur laptop while u r charging it.The reason may b that u might b using heavy application.
It could be many reasons like your RAM over heating or the battery is getting low. My friend had the same problem with his laptop, he just brought it to the shop and they fixed it. I think it's the best to let your laptop getting fixed before the HD gets damaged and you lose all your data.
most probably its your power supply is too low for your comp and thus when your comp requires excessive power it will shutdown due to the lack of power
Make sure you check the battery if not also the charger because sometimes it could be the charger which doesn't charge well, and check the power options.