Apple - MacBook Pro 15" 2008 freezes with colorful screen

Those visual artifacts are very typical of a failing GPU. This looks pretty advanced and you can usually confirm by seeing an external display fail as well.

It could be cabling or the LCD, but that’s far less likely. Super rare would be driver or software issue.

Make sure you have a good backup in case when the GPU fails it takes down the logic board as well. Worst case, removing the drive or booting in target mode is likely to be an easy data transfer if it should stop booting our the display finally fails.