A G5 is a great machine to run 10.5.8 on:
Lots of old good PowerPC and Universal applications work with a G5. Just don't get an Intel Mac only application, as it won't work with it.
Also it takes 3.5" SATA I hard drives that are 1.5 Gbps. Be sure any that are faster have the appropriate jumper to down step to that speed. Getting a 10.5, 10.5.1, 10.5.4, or 10.5.6 retail disk is advisable if you lack one.
when I plug it it there is a red light in the front and web you press power it beeps,
How many beeps?
Is RAM installed?
You need a hard drive with OS X installed to use the machine.
The minimum OS required/supported is determined by production date/series.
Open the side panel and locate the small tag (lower center) with the serial number.
Enter the serial number in the following sites' database to find out exactly what series of machine yours is: