my laptop is automatically shutting down

Does it power back on? If so it might have only overheated. What happened before it shut down? Was it laying on a pillow or something blocking the airflow on its bottom and sides?
Did you have any updates installed lately?