Hi, Gerald -
Welcome to Apple's Discussions.
If your machine is an old (original series) G4s, then it has an eject button on the front of the external (bezel) door for the CD drive.
Try this - restart or boot - immediately start pressing that button rapidly. There is a short window a few seconds long during the boot process when the drive is energized, but before it has spun up and recognized there is a disk in it. The door eject button should work at that point.
***
Alternate - locate a corded mouse, one good for use on a Mac. Plug it into a free USB port. Restart or boot - immediately press the mouse button, keep it held down - that's a hardware command to the Mac to eject all removable media during boot.
***
If the problem is that it keeps booting to the install disk, use the Startup Disk control pane (Apple menu > System Preferences) to reset the boot volume to the hard drive.