What Mac OS are you trying to install? Is it 10.2 or higher? Exactly what model/make of Mac do you have? How much memory and how big hard drive does it have? How much free space is there on the disk?
(1) If it is 10.2 or higher, you need to install a firmware update (or make sure it is already installed). This is explained in http://support.apple.com/kb/HT1395 and I believe your iMac is one of those listed near the top of that article.
(2) If you are trying to install Mac OS X (10.2, 10.3 etc.) you need to make sure your computer, which is very old, can accept the one you are trying to install. Easiest way to tell that is to indicate here exactly what model of iMac G3 you have. There is more information at this link about the iMac G3's http://www.everymac.com/systems/apple/imac/index-imac.html
For instance the iMac G3/333 can only go to 10.3, no higher, so trying to install 10.4 won't work for the iMac G3/333..
(3) Even if your computer is up to date and ready to accept the Mac OS X you want to install, you generally need a universal (retail) installer disk, not a disk that is specific for one model of computer. The latter came with those computers when they were new and mostly can be used only with that specific make/model of computer, not with any Mac.
Any of these issues listed above could have caused your problem.
Actually, I'm not sure I can tell exactly what your problem is because your post is cryptic. What do you mean by your hard drive doesn't "show up" and what disk does it start from? Are you installing from a CD or DVD? If so, you have to boot from that CD or DVD to run the installer. If you are using an install disk that doesn't work with your machine, generally you won't be able to boot from it, which also might be your problem.
Is your CD/DVD drive working? Can you use other CDs or DVDs with it?
Sort of hard to diagnose your issue(s) over the internet without much information.
Do you have it in writing that the computer works? Not being able to see the HD could mean that the HD is dead and needs replacing.
Buying from online advertisers is fraught with pitfalls.
Did you get original OS CDs with it? If so what ones?
Check your model here and let us know which you think it is;