Question My PC keeps restarting randomly..

Feb 4, 2020
1
0
10
So,recently i bought computer from a guy that guaranteed that it works perfectly.I bought computer for some gaming and like school.First 2-3 weeks it worked normaly but then it started restaring from time to time.I wasnt sure about it so i would turn the computer off because i thought it was heating.Then it started like restarting instanly when i enter some games.It usualy happends when i play games but sometimes when im online too.So, it would mean a lot to me if someone would help me.Thanks
 
So,recently i bought computer from a guy that guaranteed that it works perfectly.I bought computer for some gaming and like school.First 2-3 weeks it worked normaly but then it started restaring from time to time.I wasnt sure about it so i would turn the computer off because i thought it was heating.Then it started like restarting instanly when i enter some games.It usualy happends when i play games but sometimes when im online too.So, it would mean a lot to me if someone would help me.Thanks

Welcome to toms hardware!

Please can you state your specifications, that would be helpful.