Hi there,
By HD is completely busted and neither the recovery, nor the actual OS boots up. I have already bought a new HD but how do I install Mac on it? If I replace the Hard drives, and turn on the computer, will I be able to download Mavericks and install on it? Or do I need to find another Mac and install the OS on my HD from that computer?
Depending on the model and age of the Mac, you might still be able to install OS X on the new drive. If the Mac came pre-installed with OS X Lion or newer,
or if it's on
this list of Macs and has up-to-date firmware, then you can use
Internet Recovery to get OS X installed.
You'll need an internet connection, and a couple GB of data will get downloaded, so a good office broadband connection or a home FiOS/Cable modem service with a decent download speed is recommended,
or plenty of time and patience if your connection's on the slow side. Just install the new drive, turn on the mac, and after it figures out that the drive has no OS installed, it'll launch Internet recovery, ask you to help it out with connecting to WiFi (if not connected by ethernet) and attempt to download the OS to install it.
If your internet connection just isn't up to the task, or if your Mac isn't cable of internet recovery, then you'll need to find another working Mac, and a good size (more than 4GB) USB drive, and
follow these instructions to make a bootable install drive.