Restart Error


I've taken this laptop to several Apple stores and then some. They all give me different "solutions" to my problem in the way of replacing parts. Originally I was told the hard drive went bad, so I installed a new one. Then an Mac "Genius" told me that there was a fan that needs to be replaced but since there was no warranty that it would run me $900. I brought to an Apple certified repair center and they went on to tell me the hard drive was bad but when I left it with them for three weeks, they did nothing with it and said it was working fine. Now I have it back and I can sit and tool around for about 15-20 minutes until the "You need to restart your computer" error pops up. I have no idea where to go from here.