Your drive is "spitting out" the disc since it doesn't like its taste. Kidding aside, your CD Drive doesn't understand the Leopard Install DVD Disc.
The Solutions:
A. Install from a USB DVD Drive.
"A" really is your most cost-efficient and easiest solution.
The G4's either came with a DVD reader or CD burner. Either way, the first thing that I replaced on my G4 was the optical drive as the standard DVD reader I had sucked enormously after a few years and couldn't read any new or burned disks (it only read the older retail DVD's I had at the time).
If you know how to replace the optical drive on your G4 (it's not all that difficult, instructions can easily be found online if not videos from YouTube), it's rather inexpensive to get the newest style DL DVD/CD burner for under $75.
Aside from that, click on the Apple Menu on the upper left hand side of the screen and click About This Mac to view your system information. 512MB RAM and an 867mhz processor are required for Leopard, though I personally recommend 1Ghz and 1GB of RAM for a better experience; however; while some G4's had dual processors (labeled as DP in About This Mac), even the 800mhz DP G4's doesn't officially meet the req. for Leopard.
As a side note, if you don't meet the minimum requirements yet still want to try Leopard out or if you want to avoid purchasing a new optical drive, if you have a friend with a non Intel Mac (a Powerbook or other G4 tower; a G5 may work) you can install Leopard using Target Disk Mode (as long as the other Mac you are using does meet the req.), though I wouldn't personally recommend this if you are using it to bypass the minimum requirements.
If you don't want to install a new drive yourself, as any repair shop will charge you too much for the amount of work involved for this particular thing, I suggest purchasing a FireWire drive instead of USB. The old G4's didn't have USB 2.0 and I believe that only the newer Intel machines can boot from USB devices. Yours can boot from FireWire devices. I haven't checked lately but Lacie offered FireWire DVD burners for Mac for around $120.