Could you tell us the procesor speed of your G5, Just click the apple logo then about this mac.
Have you ever opened up the case before?
If not could you look at the back of the case and on the top left from the rear you should see the latch to open the case.
With the machine running could you open the case and see if (without touching anything yet) you can pinpoint the sound, If I am right it should be coming from one of the two rear fans, To check if this is the case could you carefully look and see if they are very dusty or gummed up and maybe wobbling.
If the rear fans are the cause then you should have no problem replacing them yourself with a new set from somewhere like We Love Macs http://www.welovemacs.com/0761047.html
If the rear fans are not the culprit could you tell me where you think the noise is located.
If you hav a G5 iMac then you are probably a victim of the Constant fan issue, Just Google imac g5 noisy fan and you will se a whole host of posts on the subject.
Sometimes it can be as simple as cleaning out the Lower intake vents to allow the air to circulate properly which you can do with a can of air, Just turn the machine off and give the lower vents a good blast (some people have just rubbed their fingers accross them and it has helped)
If cleaning the lower vents does not help you may wish to reset the SMU which is the part of the machine that controls fan speed among other things,
Turn off the computer and unplug all cables from the machine, including the power cord then wait 10 seconds.
Plug in the power cord while simultaneously pressing and holding the power button on the back of the computer then let go of the power button and wait a moment before pressing the power button agin to start your machine.
Try those and let me know what happens or if I need to give you instructions to replace the fans
It is not as difficult as most people think and Apple even post a set of Do it yourself instructions to take apart and replace almost all of the components, The manuals can be found here http://support.apple.com/kb/HT2278?viewlocale=en_US then you can try somewhere like www.welovemacs.com to get the parts you need.
Let ms know if you need more info.