If the hard drive is the problem (and it probably is as other posters have mentioned), then you'll need to boot from another device. Get a bootable disk (Windows or other OS installation disk) and make sure the system is set to boot from the CD drive first (can be set in the BIOS). If for some odd reason you cannot access the BIOS, the motherboard is likely the problem. As mentioned above, you can access the BIOS by pressing a certain key early in the boot process. The key needed differs based on who manufactured the motherboard, and this
list should tell you what to press based on the manufacturer. Scroll down to find yours.
If your computer will boot from the disk, then the motherboard should be fine and the hard drive will need to be replaced. Get a new hard drive and install an OS. After that, you can try to re-attach the old hard drive as a slave to recover data from sectors that may not be corrupted. Be sure to scan the old hard drive for viruses prior to any data recovery. If you have trouble recovering information, you may have to seek a professional technician.
If your computer still gives you errors when you try to boot from the CD drive, then you likely have an issue with your motherboard and will need to consult a professional. The professional will be able to tell you if it is just the motherboard or if more system components are problematic.