Boot to your OS X installer, then choose the Disk Utility from the menus. Click on the hardware info line for your hard drive, then click the Partition tab. Remove the existing partition by selecting "1 partition" from the Partition Layout drop-down listing. Click the Apply button, which removes any partitions, replacing with just one, and removes all other data from the drive. You should be able to install OS X now.
If Disk Utility does not see the drive at all, even the manufacturer's model info, then there's not much you can do that doesn't involve replacing the drive. Your's has apparently stopped working.
If you wish, you could tell us which Mac you have, and which version of OS X you are trying to install (might help us to decide if there is another way to proceed
)