If you have Apple Care call them. If not and you want a "do-it-yourself" fix, do a Google search, see Youtube's "How to" video tutorials and Do-It-Yourself Laptop Repair. Otherwise, take the computer to an Apple store or an AASP. Whichever is more convenient for you.
Mac OS X (10.5.5)
If you do not want to upgrade to Snow Leopard or Lion, you should at least udate Leopard. Use Software Update to update your os and anything else that needs to be updated showing up in SU which I know must be a whole lot of stuff!!!!
As it turned out the Motherboard was defect.
i let them change it on 06.2012
funny thing is the new board just died again yesterday.
i got the second board just replaced throu a third one. Everything works fine now again.
the problem is in some way connected with the ones reportet here:
many people having a ** GPU Debug Info Start ** in their logs when the problems occure. When i replaced the first board 06.2012 i didn't found any ** GPU Debug Info Start ** messages in the log, the system also was freezing and glitching in another way.
also this bug is hardware related and only fixable by replacing the logicboard eg. the gpu onboard.
hope this helps