If the MacBook was made between 2007 - 2009, then it may be the graphics card.
The Graphics card is made by nVidia. At the time they were being sued for having graphics card problems, and Apple found about this. This problem affects the 2007 - 2009 MacBooks with an nVidia GPU.
Look in System Profiler by going to the Apple Logo and clicking "About This Mac". Then Click "System Profiler" is your MacBook is not up to date. If it is, you're automatically taken to there. Look at the graphics card name. If it says "nVidia 8600M" or "nVidia 9400M", then the graphics card may be affected.
Hope this helps.