The optical drives in the iMac G3s are all notebook drives. Therefore, they use special connectors typically unavailable in desktop machines. The iMac has a circuit board with a non-standard ATA/power interface cable that interfaces with the drive, but it won't work on anything other than an iMac unless you're into hardware hacking (the cable is unusual and provides both power and ATA functions). It may be possible to find an adapter of some sort for the drive itself to attach to standard PATA and power connectors, but it's probably not worth it; the closest you'll get is one of those slim external USB optical drives (which also use notebook drives). But if you're going to go that route, it would probably be a better idea just to leave the original drive in there (unless, of course, it's dead).
But, if you've got a PC notebook in need of a new optical drive, it should swap right over once the iMac's adapter board is removed; there are no Mac/PC differences between these drives. One must simply observe the method (and correct setting) for changing the drive to Master/Slave/CS; some drives have a switch, others rely on the setting on the cable/interface board, and a few are permanently assigned in hardware or firmware (and therefore difficult to change).