Your laptop can become overheated due to a faulty fan or your cooling fans could be clogged by dirt or dust. First make sure that your using your laptop of a flat surface and not carpet, pillows, or blankets. Then take canned air and blow out the vents around the case to clear any dust or dirt that is clogging the airflow. If that still doesn't help try disconnecting your ac charger or run it on the charger without the battery for a while. If your computer continues to shut down after prolonged use then you could have a faulty fan.
If you are still having trouble refer to our troubleshooting page to better help diagnose the problem. Below I provided a link to a website where you can purchase a new fan.
https://www.cartcafe.in/samsung-n150-n150p-laptop-cpu-heatsink-cooling-fan-price-online-india