It sounds like your laptop may be overheating. This happens when the laptop components get too hot and turn off. It's pretty common for a vent to get blocked by something like dust, cutting off airflow. Try cleaning the vents on the laptop with something like a can of compressed air. That should allow more airflow, keeping things cooler and working. If that doesn't work, then it could be a more serious issue. I would check out the troubleshooting page about that here.