Welcome to Apple Support Communities
The GPU is damaged. Take the iMac to an Apple Store or reseller to get it repaired, but the logic board has to be replaced, so this may be an expensive repair.
If you have a very old Mac, Apple may not have parts to repair it. In this case, the best solution is to get a new PC or Mac so you can use the most recent operating system and you will have a PC or Mac that will be useful for years instead of using Tiger, launched in 2005
You may have a problem with the video chip.
Here is how to tell...
Shutdown your machine. Hold down the shift key. Poweron. Bootup will be longer.
Wait awhile while you harddrive is being checked.
An article on how to boot into safe mode.
Runs OK in safe mode...
Running in Safe mode leaves out some video drivers. Which results in your machine not using advanced video hardware. As luck would have it, you can run the safe mode video drivers in normal mode.
Here is how:
Look through the above thread. See the second page. You don't have to read through the first page. Just go to the part where I try a solution that works.
Summary of G5 problems. Includes instructions on a hardware fix for the brave at heart:
See -Rotten Apple- articles in both of these threads.