To answer your new question, many failed PCs do that. The causes are on the web but to narrow it down you must share more details and be willing to try some procedures and eventually replace parts.
My Lenovo IdeaCentre Intel core i7 windows 10
is turning off and restarting on its own, Does anyone have this problem.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic