Completely erased my Leopard machine from another computer, how do I install an OS on it? I started up my computer in Target Disk Mode and erased it from a friends Mac thinking that I could then install Mountain Lion without installing Snow Leopard. Do I have any way of getting my machine to work again?

It currently powers on and display a blinking folder with a question mark.

What can I do to install an OS?

I have a Mountain Lion install disk which gets spit out.

I also made an Ubuntu disk as per instructions on their site, but that gets spit out as well.

Any help?
When you turn on the computer, put the disc in the drive with one hand, and hold down the option key with the other.  This forces the Mac to look for ANY bootable media.  If nothing comes up, the hard drive is blank (as you suspect), and the ROM drive can't read the disc you are putting in (or the ROM drive has failed).  You can try creating a Mountain Lion USB key.  Incidentally, what Mac are you putting this disc in?  A Mac Book Pro, an iMac?  What generation?  What CPU is in it?