it could any of a lot of things. but around 80%, its hardware related.
it could be video card, RAM, PSU, HDD, etc.
more info would help like how many games have you tried that it goes off? one, two, three? what are these games? does your pc meet the minimum requirements of these games? and lastly, what specs are your pc